Hi,
I have got an excel spreadsheet that I have some rows protected in (utilising a macro). Because of the protected rows I can no longer insert new columns as the option is greyed out (because I have protected it against selecting some of the rows) when I right click a column header.
Is there some way that I can modify my macro to allow me to select a column that has protected cells in it? if thats not possible a macro to insert new columns when i click some button would do the job.
My macro is currently like this...
Password = ""
ActiveSheet.Unprotect Password
InsertRowsAndFillFormulas
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:= _
True, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
End Sub
many thanks,
Hugh
I have got an excel spreadsheet that I have some rows protected in (utilising a macro). Because of the protected rows I can no longer insert new columns as the option is greyed out (because I have protected it against selecting some of the rows) when I right click a column header.
Is there some way that I can modify my macro to allow me to select a column that has protected cells in it? if thats not possible a macro to insert new columns when i click some button would do the job.
My macro is currently like this...
Password = ""
ActiveSheet.Unprotect Password
InsertRowsAndFillFormulas
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:= _
True, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
End Sub
many thanks,
Hugh