Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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


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
Force excel to start new instance when I double-click a workbook [email protected][_2_] Excel Discussion (Misc queries) 0 April 30th 09 01:35 PM
'Copy to' Advance Filter depend only on sheet ID not start sheet Sandy Yates Excel Worksheet Functions 0 April 4th 06 03:48 AM
double click a xls file and start Excel but without the file Danyi, Attila Excel Discussion (Misc queries) 2 December 22nd 04 02:19 PM
Can't start macro via button click dan Excel Programming 1 November 3rd 04 08:48 PM
Start a sheet event when i leave a sheet hans[_3_] Excel Programming 2 May 21st 04 09:43 PM


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