Sub iNSERTROWS ()
If Not Intersect(ActiveCell, Range("d:d")) Is Nothing And ActiveCell <> "" Then
n = ActiveCell.Row
For x = n + 1 To n + 1000
If Cells(x, 4) <> "" Then
Exit For
End If
Next
Worksheets("A").Cells(x, 1).EntireRow.Insert
Worksheets("R2").Cells(x, 1).EntireRow.Insert
Cells(x, 11).Value = 2
Cells(x, 19).Value = ActiveCell
Else
MsgBox "
If you want to add a line, place your cursor on the Cells (Box) program you want to add"
End If
End Sub
Sub dELETErOWS()
YesNO = MsgBox("Apakah Anda Yakin akan menghapus baris ini ?", vbYesNo)
Select Case YesNO
Case vbYes
If Not Intersect(ActiveCell, Range("d:d")) Is Nothing And ActiveCell = "" Then
ActiveCell.EntireRow.Delete
Else
MsgBox "
You cannot delete this row, this is because you are trying to delete a row that contains ACTIVITIES or you did not place your COURSE in the ACTIVITY column"
End If
Case vbNo
End Select
End Sub
Как исправить код VBA в Sub dELETErOWS()
, чтобы удалить строки с активными ячейками для двух листов одновременно