Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default 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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Error when Sheet is Protected Johnny Excel Discussion (Misc queries) 4 July 28th 06 07:43 PM
macro on protected sheet-error michaelberrier Excel Discussion (Misc queries) 6 June 11th 06 06:31 PM
Error message with protected sheet HRman Excel Discussion (Misc queries) 1 November 28th 05 06:59 PM
Error 1004 when running on a protected sheet jmj2366 Excel Programming 0 August 25th 04 05:32 PM
Error 91 but only when sheet is protected Limey1971 Excel Programming 2 January 22nd 04 10:27 AM


All times are GMT +1. The time now is 01:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"