View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_660_] Simon Lloyd[_660_] is offline
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