HomeGrowth
Technical User
Hi There, I need some expertise
I want to add a row to a protected worksheet. The sub below does it OK, except I need to "fill series of the first column" instead just copy. My first column is just a sequencial number, now have 10 rows, and end with 10. The first add should give me "11", next add give me "12" and so on. So, how do I modify my ActiveCell.EntireRow.FillDown code to do just that. Thank you.
Sub AddRowForMe()
'Unprotect the workshet
ActiveSheet.Unprotect
'Start at cell A11, loop to the next empty cell,
Range("A11").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
'then copy fill down.
ActiveCell.EntireRow.FillDown
'Reprotect the sheet
ActiveSheet.Protect
End Sub
I want to add a row to a protected worksheet. The sub below does it OK, except I need to "fill series of the first column" instead just copy. My first column is just a sequencial number, now have 10 rows, and end with 10. The first add should give me "11", next add give me "12" and so on. So, how do I modify my ActiveCell.EntireRow.FillDown code to do just that. Thank you.
Sub AddRowForMe()
'Unprotect the workshet
ActiveSheet.Unprotect
'Start at cell A11, loop to the next empty cell,
Range("A11").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
'then copy fill down.
ActiveCell.EntireRow.FillDown
'Reprotect the sheet
ActiveSheet.Protect
End Sub