Hi guys,
I badly need some help. I am clueless about programming. I wanted to delete rows in a protected sheet, and i Learned you cannot do that if your rows have formulas even if you tick the DELETE ROWS column while protecting the sheet. Hence, I learned about Recording macros. I record a macro to unprotect the sheet, delete the rows and protect the sheet again.
However, the recorded macro always deletes the same 3 rows that I selected while recording the macro. I want to edit the macro so that it can delete the desired no. of SELECTED rows or ACTIVE ROWS. I have tried quite a few things but nothing works.I dont know what I am doing wrong. Please modify this macro for me in a simple manner as I dont know any programming
This is the macro as I see it when I go to edit it
Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+q
'
ActiveSheet.Unprotect
Range("A4:A6").Select
Selection.EntireRow.Delete
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowDeletingRows:=True
End Sub
I want to change the RANGE ("A4:A6") so that I can delete all the rows that I have selected instead of just these three rows. Make it general.
Any help would be really great
Thanksa lot
Bookmarks