ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Start a macro when click on tab sheet (https://www.excelbanter.com/excel-programming/398357-start-macro-when-click-tab-sheet.html)

Nancy[_7_]

Start a macro when click on tab sheet
 
Hi,



When I click on a tabsheet to open a sheet I would like that automaticly
u=one macro start to update this sheet.
It is possible?
Thank you in advance

Nancy

Mike

Start a macro when click on tab sheet
 
Paste this into the worksheet module
Private Sub Worksheet_Activate()
MsgBox "start to update this sheet"
End Sub

"Nancy " wrote:

Hi,



When I click on a tabsheet to open a sheet I would like that automaticly
u=one macro start to update this sheet.
It is possible?
Thank you in advance

Nancy


Jean[_6_]

Start a macro when click on tab sheet
 
?B?TWlrZQ==?= wrote in
:

Paste this into the worksheet module
Private Sub Worksheet_Activate()
MsgBox "start to update this sheet"
End Sub

"Nancy " wrote:

Hi,



When I click on a tabsheet to open a sheet I would like that
automaticly u=one macro start to update this sheet.
It is possible?
Thank you in advance

Nancy



I try it but nothing happens!

Nancy

Gary Keramidas

Start a macro when click on tab sheet
 
put the code on the sheet that is activated when you click the tab,
for example, if you want the code to fire when you click on sheet2
then in the vb editor, double click sheet2 under ms excel objects and paste his
code there.

Private Sub Worksheet_Activate()
MsgBox "start to update this sheet"
End Sub


--


Gary


"Jean " <morlan(; wrote in message
.70...
?B?TWlrZQ==?= wrote in
:

Paste this into the worksheet module
Private Sub Worksheet_Activate()
MsgBox "start to update this sheet"
End Sub

"Nancy " wrote:

Hi,



When I click on a tabsheet to open a sheet I would like that
automaticly u=one macro start to update this sheet.
It is possible?
Thank you in advance

Nancy



I try it but nothing happens!

Nancy




Gord Dibben

Start a macro when click on tab sheet
 
Jean

Where did you place the code?

Right-click on the sheet tab and "View Code"

Copy/paste the code into that sheet module.

Switch to another sheet then back to first sheet to "Activate" the code.


Gord Dibben MS Excel MVP

On Sat, 29 Sep 2007 03:40:33 -0000, Jean wrote:

?B?TWlrZQ==?= wrote in
:

Paste this into the worksheet module
Private Sub Worksheet_Activate()
MsgBox "start to update this sheet"
End Sub

"Nancy " wrote:

Hi,



When I click on a tabsheet to open a sheet I would like that
automaticly u=one macro start to update this sheet.
It is possible?
Thank you in advance

Nancy



I try it but nothing happens!

Nancy




All times are GMT +1. The time now is 02:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com