Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
protect in macro
I have the following code in a Macro to refresh an external database query.
Sheets("Client & Staff Data").Select ActiveSheet.Unprotect Password:="pancake" ActiveWorkbook.RefreshAll Range("M3:N3").Select Selection.AutoFill Destination:=Range("M3:N98"), Type:=xlFillDefault ActiveSheet.Protect Password:="pancake" When I test it by stepping through the code using F8 it works perfectly. But when I activate it with a button, I get two messages that I need to first unprotect the sheet. Why is it working when tested but not on the button? Regards |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protect a Macro | Excel Programming | |||
protect a macro | Excel Programming | |||
Protect Macro | Excel Programming | |||
protect a macro | Excel Programming | |||
protect - macro? | Excel Programming |