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: 1
Default HELP!! Cannot set any sheets to visible


Hello,

I hope I can explain this! Here goes -

I have a VB app that creates an xls file from a template xlt file. I
adds in some sheets into the xlt file and then perform a save as t
save the file as an xls file. Then I have some 'clever' VBA code tha
hides all of the sheets on save apart from a warning page. On open th
the workbook_open runs a macro to make all the sheets visible.

So, when I open the file in xl XP, there is no problem - i.e. the macr
runs and then the sheets are made visible, great.

The problem, is however, with excel 97!! The macro runs and sets al
the sheets using:-

ThisWorkbook.Sheets(sName).Visible = xlSheetVisible

(sName comes from a hidden sheet)

The code runs through the sheets to be made visible (held on the abov
mentioned hidden sheet) and then sets the value to be -
(xlSheetHidden). Unfortunatley it doesn't actually change the valu
AND it doesn't give any error - it just does nothing?! How can thi
be?!!

Oddly, if I can run the workbook_open event manually from the VB edito
and it all works?!

Bizarrely, if I delete the sheets that have come from my VB app, sav
and close then the macro works fine on open.

If anyone has any thoughts they would be greatly appreciated!

Thanks!!!

Richar

--
cassidyr
-----------------------------------------------------------------------
cassidyr1's Profile: http://www.excelforum.com/member.php...nfo&userid=734
View this thread: http://www.excelforum.com/showthread.php?threadid=27250

 
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 password-All sheets visible puiuluipui Excel Discussion (Misc queries) 4 September 15th 09 05:47 PM
Print Visible Sheets Macro Lisa C. Excel Discussion (Misc queries) 1 April 6th 09 06:08 AM
Can I copy just the visible sheets? Trefor Excel Discussion (Misc queries) 2 September 3rd 06 02:31 PM
3 sheets in workbook, but visible only one? slaya_cz Excel Discussion (Misc queries) 3 September 30th 05 01:37 PM
checking visible sheets. Scott Excel Programming 6 September 1st 03 05:21 PM


All times are GMT +1. The time now is 10:58 PM.

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"