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: 92
Default Workbook_Open Problem ... Worksheets not loaded yet!?

Hello -

I want to make sure that some buttons on one of the sheets of a
workbook are disabled if the file was opened in read-only. I put the
following in the Activate() handler of that workbook:

Private Sub Worksheet_Activate()
If ThisWorkbook.ReadOnly Then

ThisWorkbook.Sheets("Sheet2").Shapes("xButton").Co ntrolFormat.Enabled =
False

....

The only problem with that is that if the workbook is opened with that
sheet being visible (active) already, it won't work until I switched
sheets and come back to this one.

I tried to put something similiar into the Workbook_Open() handler but
there seems to be a problem since that is called without all the sheets
being loaded. Is there a way I can wait until all the sheets are
loaded in there and then disable my buttons?

Thanks so much!
Joe

 
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
Problem with Workbook_open Vick Excel Discussion (Misc queries) 13 February 14th 06 10:40 PM
Excel 97 Workbook_Open problem cassidyr1[_2_] Excel Programming 1 October 26th 04 02:58 PM
Workbook_Open problem TroyH Excel Programming 4 April 13th 04 11:56 AM
problem with code in workbook_open event Dominique Schroeder Excel Programming 3 April 7th 04 01:56 AM
how to know if a xla is 'loaded' Isabelle Robin Excel Programming 5 March 5th 04 11:07 AM


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