Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hiding/Unhiding multiple sheets in VBA?


Hi all,

Im trying to hide and unhide sheets in an auto_open/close so that the
user has to enable macro's to view the rest of the sheets i can hide
them ok but unhiding is proving a problem heres what i have tried. This
below was to hide in the autoclose, and below it is my auto_open which
then calls the code that used to be my Auto_open but sheets wont unhide
and i a get method of selection class error, im using excel 2003 winxp

thanks,

Simon

Sheets(Array("Holidays", "Holiday Count", "Xtra's & count")).Select
Sheets("Xtra's & count").Activate
ActiveWindow.SelectedSheets.Visible = False

Sub Auto_open()
Sheets(Array("Holidays", "Holiday Count", "Xtra's & count")).Select
Sheets("Xtra's & count").Activate
ActiveWindow.SelectedSheets.Visible = True
Call Auto1
End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=484793

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hiding/Unhiding multiple sheets in VBA?


Hi,

I'm now using this which works but on the hide it is now only hiding
one of the two sheets any ideas why?

Sub Auto_open()
Worksheets("Holidays").Visible = True
Worksheets("Holiday Count").Visible = True
Worksheets("Xtra's & count").Visible = True
Worksheets("Front").Visible = False
Sheets("Holidays").Activate
Call Auto1
End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=484793

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hiding/Unhiding multiple sheets in VBA?


Sorry all!!

Sorted it!, when i added the extra sheet "front" i added it before th
array selection, once i moved it to the end it all worked fine.

Regards,

Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=48479

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
Hiding / Unhiding Sheets Larry Fitch Excel Discussion (Misc queries) 1 December 2nd 09 02:42 PM
need code for hiding/unhiding sheets using checkboxes pzx8hf Excel Worksheet Functions 1 August 13th 08 12:11 AM
Hiding and unhiding sheets D.Hay Excel Discussion (Misc queries) 2 December 10th 05 03:59 PM
Hiding/Unhiding sheets and rows (An easy one for most of you....) Dean Goodmen Excel Programming 2 February 24th 05 11:06 PM
Hiding and Unhiding work sheets Frank[_19_] Excel Programming 3 November 19th 03 11:27 PM


All times are GMT +1. The time now is 09:23 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"