Hi Team,
I am using the below code.
Private Sub Workbook_Open()
Sheets("AD").Select
Sheets("AD").Cells.Interior.Color = xlNone
Call sbProtectSheet
End Sub
Sub sbProtectSheet()
ActiveSheet.Protect "xxx", True, True
End Sub
Sub sbUnProtectSheet()
ActiveSheet.Unprotect "xxx"
End Sub
Color1.jpg
When files open I am getting the "Run-Time Error 1004.Application Defined or object define error". Please advise me.
I am planning when the file open then it will protect the Sheets("AD") and remove the entire fill colour from the sheet.
Please advise me.
Regards,Waqar
Bookmarks