LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Worksheet Deactivate

I am trying to enter code in a worksheet so that when I move to another
worksheet, several columns are hidden in the original worksheet, so that
when I return to it they are hidden. This is the code I am using but
keep getting a de-bug message.

Private Sub Worksheet_Deactivate()
ActiveSheet.Unprotect
Columns("O:Z").EntireColumn.Hidden = True
ActiveSheet.Protect
End Sub

I am sure it probably has something to do with the term Activesheet but
I don't know how to get round it.
I would appreciate any help.

Kind Regards
Graham Haughs
Turriff, Scotland
 
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
pivot chart causes worksheet to deactivate J Owen Excel Discussion (Misc queries) 2 January 22nd 07 07:32 PM
Deactivate worksheet Cordobes Excel Discussion (Misc queries) 3 December 4th 05 10:16 AM
deactivate fullscreen MD Excel Programming 3 March 13th 05 08:52 PM
Deactivate autofill sowetoddid[_53_] Excel Programming 1 June 23rd 04 03:04 AM
Delete Worksheet on DeActivate TJ Walls Excel Programming 3 May 17th 04 06:44 PM


All times are GMT +1. The time now is 04:16 AM.

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

About Us

"It's about Microsoft Excel"