Hi All,
I'm currently experimenting with unprotecting and protecting workbooks using VBA but have been unsuccessful in getting it to work for one of my workbooks.
In row 1 which is a hidden, fully formatted blank row, I'm trying to unprotect a portion of that row (BP1:DR1), copy and paste the entire row, paste it to the bottom of the table below and then protect that specific portion again.
I intedn for this function to be incorporated within the new row macro that I'm currently using.
The existing VBA Im using is fairly simple but keeps incurring an error. I would imagine that it would need to change to suit this new requirement;
Where in this would I need to fit the protect/unprotect feature in this case?
Any help with this would be greatly appreciated!
Thanks in advance!
Jeevz
I'm currently experimenting with unprotecting and protecting workbooks using VBA but have been unsuccessful in getting it to work for one of my workbooks.
In row 1 which is a hidden, fully formatted blank row, I'm trying to unprotect a portion of that row (BP1:DR1), copy and paste the entire row, paste it to the bottom of the table below and then protect that specific portion again.
I intedn for this function to be incorporated within the new row macro that I'm currently using.
The existing VBA Im using is fairly simple but keeps incurring an error. I would imagine that it would need to change to suit this new requirement;
VBA Code:
Sub Rev_Add_new_row_2()
Dim tbl As ListObject
Dim rw As Range
Set tbl = Sheets("Master Input").ListObjects(1)
Set rw = tbl.ListRows.Add.Range
Sheets("Master Input").Range("A1:HS1").Copy rw
End Sub
Where in this would I need to fit the protect/unprotect feature in this case?
Any help with this would be greatly appreciated!
Thanks in advance!
Jeevz