Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro autorunning

Hi
How can I get a certain macro run automaticly when selectin a certain
worksheet?
(excel 2003)
rgds, Pekka
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Macro autorunning

Right click on the worksheet tabview codeleft window select
worksheetright window select activate.

--
Don Guillett
SalesAid Software

"pjotr" wrote in message
...
Hi
How can I get a certain macro run automaticly when selectin a certain
worksheet?
(excel 2003)
rgds, Pekka



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro autorunning

Thanks Don but still I have the same problem. The Macro (sub test()) do not
run automatically when selecting sheet2 unless I put put the macro in the
sheet2 VBA-area. What did I do wrong?
Pjotr

"Don Guillett" kirjoitti:

Right click on the worksheet tabview codeleft window select
worksheetright window select activate.

--
Don Guillett
SalesAid Software

"pjotr" wrote in message
...
Hi
How can I get a certain macro run automaticly when selectin a certain
worksheet?
(excel 2003)
rgds, Pekka




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Macro autorunning

Pekka

Right-click on the sheet tab and "view code"

Copy/paste this into the module.

Private Sub Worksheet_Activate()
your_macro_name
End Sub

Gord Dibben Excel MVP

On Sun, 8 Aug 2004 10:33:02 -0700, "pjotr"
wrote:

Hi
How can I get a certain macro run automaticly when selectin a certain
worksheet?
(excel 2003)
rgds, Pekka


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro autorunning

Thanks Gord. now it works

"Gord Dibben" kirjoitti:

Pekka

Right-click on the sheet tab and "view code"

Copy/paste this into the module.

Private Sub Worksheet_Activate()
your_macro_name
End Sub

Gord Dibben Excel MVP

On Sun, 8 Aug 2004 10:33:02 -0700, "pjotr"
wrote:

Hi
How can I get a certain macro run automaticly when selectin a certain
worksheet?
(excel 2003)
rgds, Pekka



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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Autorunning Macros That's Confidential Excel Programming 5 May 10th 04 09:38 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 04:26 AM.

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

About Us

"It's about Microsoft Excel"