Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 400 on making row visible on a protected sheet
I have a button which kicks off a VBA method which either hides or
unhides rows on a Worksheet. I'd like to protect the worksheets but if I do an Error 400 occurs when the VBA attempts to change a row's status from visible to invisible. I've tried various protection settings but I still get the same error. Is there one I should have tried? Any suggestions? Should I have VBA unprotect/protect the sheet? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 400 on making row visible on a protected sheet
Use the VBA to unprotect the sheet just before unhiding and then protect
again just after -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk HIS wrote in message ups.com... I have a button which kicks off a VBA method which either hides or unhides rows on a Worksheet. I'd like to protect the worksheets but if I do an Error 400 occurs when the VBA attempts to change a row's status from visible to invisible. I've tried various protection settings but I still get the same error. Is there one I should have tried? Any suggestions? Should I have VBA unprotect/protect the sheet? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 400 on making row visible on a protected sheet
thats what I would do
Sub Macro1() ' ActiveSheet.Unprotect 'your code ActiveSheet.Protect End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error 400 on making row visible on a protected sheet
Unprotect the sheet
change the rows protect the sheet Look at the Protect and Unprotect methods of the Worksheet object. -- Regards, Tom Ogilvy wrote in message ups.com... I have a button which kicks off a VBA method which either hides or unhides rows on a Worksheet. I'd like to protect the worksheets but if I do an Error 400 occurs when the VBA attempts to change a row's status from visible to invisible. I've tried various protection settings but I still get the same error. Is there one I should have tried? Any suggestions? Should I have VBA unprotect/protect the sheet? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Error when Sheet is Protected | Excel Discussion (Misc queries) | |||
macro on protected sheet-error | Excel Discussion (Misc queries) | |||
Error message with protected sheet | Excel Discussion (Misc queries) | |||
Error 1004 when running on a protected sheet | Excel Programming | |||
Error 91 but only when sheet is protected | Excel Programming |