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: 270
Default Run code conditional on sheet visibility

Hi
I have a situation whereby if sheet "LogGraph3" is the only sheet visible
then I do not require the Workbook_BeforeClose to run, how do I incorporate
that into the following.

******Sub Starts******
Sub Workbook_BeforeClose(Cancel As Boolean)

If Sheets("LogGraph3") 'is the only visible sheet' Then
GoTo EarlyEnd

Else
Do closing code
End If

EarlyEnd:
Some Code

End Sub
******Sub Ends*******

Thanks
Sandy

 
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
conditional visibility of check box Erol Excel Discussion (Misc queries) 5 May 12th 09 08:03 PM
help with code for conditional summary sheet englishdad Excel Discussion (Misc queries) 4 January 27th 09 02:11 PM
Ensure macros enabled - C. Pearson's sheet visibility method Horatio J. Bilge, Jr. Excel Programming 0 December 3rd 07 05:36 PM
Toggle sheet visibility John[_130_] Excel Programming 2 October 11th 07 02:04 AM
Excel 2002? Where to store code for all spreadsheet visibility? Colin Johnson Excel Programming 0 February 26th 04 03:17 PM


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