Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Can I control Macro run automatically current worksheet?

I run a Macro in Excel 2003 with VBA, I want to run this Macro the current
worksheet, not other worksheet, even if others worksheet is opening. Can
anyone know how to control this macro run automatically appointed worksheet?
--
Developer
QA Dashboard
Microsoft China Development Centre
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Can I control Macro run automatically current worksheet?

you could start you macro by activating the sheet you want ...or..

With Sheets("MySheet")
your code
End with

"Microlong" wrote:

I run a Macro in Excel 2003 with VBA, I want to run this Macro the current
worksheet, not other worksheet, even if others worksheet is opening. Can
anyone know how to control this macro run automatically appointed worksheet?
--
Developer
QA Dashboard
Microsoft China Development Centre

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Can I control Macro run automatically current worksheet?

Instead of references to a specific sheet,
Use Activesheet to refer to the sheet. Use ActiveWorkbook to refer to
workbook containing the currently active sheet.

--
Regards,
Tom Ogilvy

"Microlong" wrote in message
...
I run a Macro in Excel 2003 with VBA, I want to run this Macro the current
worksheet, not other worksheet, even if others worksheet is opening. Can
anyone know how to control this macro run automatically appointed

worksheet?
--
Developer
QA Dashboard
Microsoft China Development Centre



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
How to add a worksheet automatically using macro in xls? eva Excel Worksheet Functions 2 December 4th 07 11:16 PM
Macro add worksheet to workbook automatically Davin Excel Discussion (Misc queries) 0 February 17th 06 05:36 PM
Run macro automatically on opening of worksheet bnkone Excel Worksheet Functions 1 February 13th 06 09:46 PM
Can I automatically enter the current date or current time into a Ben New Users to Excel 7 October 19th 05 03:38 PM
Macro to hide the current worksheet. LDanix Excel Programming 2 October 29th 04 08:21 PM


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