Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
AJ AJ is offline
external usenet poster
 
Posts: 99
Default Hide Sheet when another sheet is chosen

Hello
I have a workbook with just two work sheets.
Sheet 1 is the one with details and is hidden unless I need to update it.
Sheet 2 is the one being used most of the time.

What I would like to do is to write a code that after I update the data in
Sheet 1 and when I select Sheet 2 to use it, Sheet 1 must be hidden (and
remain hidden) until the time I unhide using the normal Unhide command in the
Format Menu.

Thanks in advance for your help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Hide Sheet when another sheet is chosen

In the VBA Module for Sheet1, enter

Sheets("Sheet1").Visible = False

in the Worksheet_Deactivate event.

Your finished code will look like:

Private Sub Worksheet_Deactivate()
Sheets("Sheet1").Visible = False
End Sub

---
HTH
Roger
Shaftesbury (UK)
(Excel 2003, Win XP/SP2)



"AJ" wrote in message
...
Hello
I have a workbook with just two work sheets.
Sheet 1 is the one with details and is hidden unless I need to update it.
Sheet 2 is the one being used most of the time.

What I would like to do is to write a code that after I update the data in
Sheet 1 and when I select Sheet 2 to use it, Sheet 1 must be hidden (and
remain hidden) until the time I unhide using the normal Unhide command in
the
Format Menu.

Thanks in advance for your help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Hide Sheet when another sheet is chosen

On 10 okt, 08:30, AJ wrote:
Hello
I have a workbook with just two work sheets.
Sheet 1 is the one with details and is hidden unless I need to update it.
Sheet 2 is the one being used most of the time.

What I would like to do is to write a code that after I update the data in
Sheet 1 and when I select Sheet 2 to use it, Sheet 1 must be hidden (and
remain hidden) until the time I unhide using the normal Unhide command in the
Format Menu.

Thanks in advance for your help.


The most simple way to do this is with a macro in Sheet1
and then use the code:

Private Sub Worksheet_Deactivate()
Worksheets(1).Visible = xlSheetHidden
End Sub

greetings

Steven

Reply
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
Filter rows on sheet 2 when a certain option is chosen on sheet 1 GIP Excel Worksheet Functions 1 August 19th 10 07:48 PM
Create Sheet, Hide Sheet Dave Excel Discussion (Misc queries) 2 October 30th 07 03:40 PM
Data on UserForm to different sheet based on day of week chosen? JennLee Excel Programming 3 March 6th 07 04:01 PM
Opening a workbook to a chosen sheet? renderingsanity Excel Discussion (Misc queries) 1 March 29th 06 02:17 PM
hide sheet? uncheck sheet tabs? or ??? NetComm888 Excel Programming 1 February 10th 04 04:38 AM


All times are GMT +1. The time now is 11:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"