Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Open/On Close
I have three sheets: X, Y, & Z. The only sheet I want
visible when first opened or when closed is sheet X. What would the VBA code look like to accomplish this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Open/On Close
Jeff,
You can use Worksheets("You Sheet").Activate at the begging of your macro and when you close. HTH Charle -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Open/On Close
One way, Jeff,
In the code module for ThisWorkbook: '***** Option Explicit Private Sub Workbook_Open() Dim wks As Worksheet For Each wks In Me.Worksheets If wks.Name < "Sheet1" Then wks.Visible = xlSheetHidden Next End Sub '***** You may enter the same code in Workbook_Close as well, so the sheets will not be visible if the workbook is opened with macros disabled.- HTH Anders Silven "Jeff" skrev i meddelandet ... I have three sheets: X, Y, & Z. The only sheet I want visible when first opened or when closed is sheet X. What would the VBA code look like to accomplish this? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Open/On Close
I replied to your earlier post. What was wrong with that suggestion?
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jeff" wrote in message ... I have three sheets: X, Y, & Z. The only sheet I want visible when first opened or when closed is sheet X. What would the VBA code look like to accomplish this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
open and close files | Excel Worksheet Functions | |||
How do I close all open spreadsheets at once? | Excel Discussion (Misc queries) | |||
Slow to open /close | New Users to Excel | |||
How can I close only 1 workbook when I have many open? | Excel Discussion (Misc queries) | |||
run macro on close & open | Excel Programming |