Hi
I am trying to write a simple macro to make repetitive task much easier.
Issue I have is that when I run the Macro I cant use the filters or hide/ unhide features.
I don't have this issue prior to running the Macro.
The spread sheet itself if Password protected but I thought I had written correctly to unlock and lock it again. Is it when the code is locking the spread sheet again that these functions are being disabled???
Also someone mentioned I should consider writing an Error handling code. What would that look like.? Are there general ones out there that would not leave the spread sheet open if it encountered an error??
To keep it simple this is the code im working on.
Sub Pending()
'
' Pending Macro
'
'
ActiveSheet.Unprotect Password:="Jim"
Columns("C:E").Select
Selection.EntireColumn.Hidden = True
ActiveSheet.Range("$A$7:$AJ$84").AutoFilter Field:=13, Criteria1:="Pending"
Range("A10").Select
ActiveSheet.Protect Password:="Jim"
End Sub
Thanks
Jim
I am trying to write a simple macro to make repetitive task much easier.
Issue I have is that when I run the Macro I cant use the filters or hide/ unhide features.
I don't have this issue prior to running the Macro.
The spread sheet itself if Password protected but I thought I had written correctly to unlock and lock it again. Is it when the code is locking the spread sheet again that these functions are being disabled???
Also someone mentioned I should consider writing an Error handling code. What would that look like.? Are there general ones out there that would not leave the spread sheet open if it encountered an error??
To keep it simple this is the code im working on.
Sub Pending()
'
' Pending Macro
'
'
ActiveSheet.Unprotect Password:="Jim"
Columns("C:E").Select
Selection.EntireColumn.Hidden = True
ActiveSheet.Range("$A$7:$AJ$84").AutoFilter Field:=13, Criteria1:="Pending"
Range("A10").Select
ActiveSheet.Protect Password:="Jim"
End Sub
Thanks
Jim