Hello, I have the following issue with a VBA Code and would appreciate some help. I'm copying the last row of a table and inserting it below.
Now, the content of some cells must be cleared.
So far I am able to clear step by step the content of each defined cell.
I'm sure there must be a easier way to do this.
Can you help?
Here is the VBA code that I have so far:
Private Sub Add_Click()
Sheets("Overview").Unprotect Password:="XXX"
myCheck = MsgBox("new project?", vbYesNo)
If myCheck = vbNo Then Exit Sub
ActiveSheet.Range("i65536").End(xlUp).EntireRow.Select
Selection.Copy
ActiveSheet.Range("i65536").End(xlUp).Offset(1, 0).EntireRow.Select
Selection.Insert
Range("J" & (ActiveCell.Row)).Value = Date
Range("K" & (ActiveCell.Row)).ClearContents
Range("L" & (ActiveCell.Row)).ClearContents
Range("N" & (ActiveCell.Row)).ClearContents
'and so on!
End Sub
Now, the content of some cells must be cleared.
So far I am able to clear step by step the content of each defined cell.
I'm sure there must be a easier way to do this.
Can you help?
Here is the VBA code that I have so far:
Private Sub Add_Click()
Sheets("Overview").Unprotect Password:="XXX"
myCheck = MsgBox("new project?", vbYesNo)
If myCheck = vbNo Then Exit Sub
ActiveSheet.Range("i65536").End(xlUp).EntireRow.Select
Selection.Copy
ActiveSheet.Range("i65536").End(xlUp).Offset(1, 0).EntireRow.Select
Selection.Insert
Range("J" & (ActiveCell.Row)).Value = Date
Range("K" & (ActiveCell.Row)).ClearContents
Range("L" & (ActiveCell.Row)).ClearContents
Range("N" & (ActiveCell.Row)).ClearContents
'and so on!
End Sub