Курсовая работа: Компьютерная подготовка

EndIf

ThisWorkbook.ActiveSheet.Unprotect

addRowForm.Show vbModal

ThisWorkbook.ActiveSheet.Protect

EndSub

Sub delRecord()

If (ActiveCell.row < 5) Or (Len(ActiveCell.EntireRow.Cells(, 1).Value) = 0) Then

ExitSub

EndIf

ThisWorkbook.ActiveSheet.Unprotect

If Selection.Rows.count = 1Then

delRowForm.Show vbModal

Else

Dim response

response = MsgBox("Отмеченозаписей: " + Str(Selection.Rows.count) + Chr(13) + "Удалитьвсе?", vbYesNoCancel, "Внимание!")

If response = vbYes Then

Selection.EntireRow.Delete

EndIf

EndIf

ThisWorkbook.ActiveSheet.Protect

EndSub

Sub editRecord()

If (ActiveCell.row < 5) Or (Len(ActiveCell.EntireRow.Cells(, 1).Value) = 0) Then

ExitSub

EndIf

ThisWorkbook.ActiveSheet.Unprotect

editRowForm.Show vbModal

ThisWorkbook.ActiveSheet.Protect

EndSub

К-во Просмотров: 1675
Бесплатно скачать Курсовая работа: Компьютерная подготовка