#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Making macro

To make a macro that if I selected sheet2 , sheet1 hide
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Making macro

Private Sub Worksheet_Activate()
Worksheets("Sheet1").Visible = xlSheetHidden
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the Sheet2 worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"George A. Jululian" <George A. wrote in
message ...
To make a macro that if I selected sheet2 , sheet1 hide



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Making macro

Right click on the tabl for sheet 2 and select View Code. Paste the following
code...

Private Sub Worksheet_Activate()
Sheets("Sheet1").Visible = xlSheetHidden
End Sub
--
HTH...

Jim Thomlinson


"George A. Jululian" wrote:

To make a macro that if I selected sheet2 , sheet1 hide

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default Making macro

Thank you very much for your help

I want the macro run as soon as I select sheet2 sheet1 to be hide

regards

"Bob Phillips" wrote:

Private Sub Worksheet_Activate()
Worksheets("Sheet1").Visible = xlSheetHidden
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the Sheet2 worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"George A. Jululian" <George A. wrote in
message ...
To make a macro that if I selected sheet2 , sheet1 hide




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default Making macro

Thank you very much for your help

I want the macro run as soon as I select sheet2 sheet1 to be hide

regards

"Jim Thomlinson" wrote:

Right click on the tabl for sheet 2 and select View Code. Paste the following
code...

Private Sub Worksheet_Activate()
Sheets("Sheet1").Visible = xlSheetHidden
End Sub
--
HTH...

Jim Thomlinson


"George A. Jululian" wrote:

To make a macro that if I selected sheet2 , sheet1 hide



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default Making macro

please ignore my previous massage your massage was very clear and very
helpful thanks again

"Bob Phillips" wrote:

Private Sub Worksheet_Activate()
Worksheets("Sheet1").Visible = xlSheetHidden
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the Sheet2 worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"George A. Jululian" <George A. wrote in
message ...
To make a macro that if I selected sheet2 , sheet1 hide




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default Making macro

please ignore my previous massage your massage was very clear and very
helpful thanks again

"Jim Thomlinson" wrote:

Right click on the tabl for sheet 2 and select View Code. Paste the following
code...

Private Sub Worksheet_Activate()
Sheets("Sheet1").Visible = xlSheetHidden
End Sub
--
HTH...

Jim Thomlinson


"George A. Jululian" wrote:

To make a macro that if I selected sheet2 , sheet1 hide

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Making macro

That is what Bob's event code does.

When sheet2 is activated, sheet1 hides.

Did you paste the code into the sheet2 module as Bob instructed?


Gord Dibben MS Excel MVP

On Sat, 21 Jul 2007 07:30:02 -0700, George A. Jululian
wrote:

Thank you very much for your help

I want the macro run as soon as I select sheet2 sheet1 to be hide

regards

"Bob Phillips" wrote:

Private Sub Worksheet_Activate()
Worksheets("Sheet1").Visible = xlSheetHidden
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the Sheet2 worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"George A. Jululian" <George A. wrote in
message ...
To make a macro that if I selected sheet2 , sheet1 hide





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
Making a macro always available simonc Excel Discussion (Misc queries) 1 April 19th 07 09:30 AM
help on macro for making chart roger Charts and Charting in Excel 3 April 2nd 07 04:43 PM
making chart using macro roger Excel Discussion (Misc queries) 0 March 30th 07 04:46 PM
making chart using macro roger Excel Discussion (Misc queries) 0 March 30th 07 04:45 PM
Making #N/A zero or - shikamikamoomoo Excel Discussion (Misc queries) 3 March 23rd 06 04:29 PM


All times are GMT +1. The time now is 08:18 PM.

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"