LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default write a macro to run a macro

You have a couple of choices.

In your workbook_open code select the sheet you want then run the macro.

sub workbook_open()
Sheets("Sheet1").select
macroname
end sub

Or select the proper sheet in your macro.


Gord Dibben MS Excel MVP

On Fri, 14 Aug 2009 14:15:03 -0700, Flipper
wrote:

Ok, thanks Luke. I did get Automatic Run to work, but it leads me to another
problem, which is that whatever worksheet that was active when I closed the
workbook is where the Automatic Run places the results of the macro, rather
than where the macro is supposed to go. As follows
The workbook contains about 20 separate worksheets. I have 2 macros, each
macro applies specifically to 1 worksheet. That, one macro performs a series
of steps where it opens another file, copies data, and then pastes that data
into that specific worksheet. When I added the Automatic Run, it pasted the
data into whatever worksheet was active when I previously closed the workbook.


 
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 write a macro JStiehl Excel Discussion (Misc queries) 4 August 11th 08 10:08 PM
Can one VB macro write another macro? Gizmo63 Excel Worksheet Functions 1 May 9th 06 03:46 PM
How to write a macro?? Keeter Excel Discussion (Misc queries) 1 July 19th 05 08:34 PM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM
Q: how can I write this macro? JIM.H. Excel Discussion (Misc queries) 6 May 30th 05 11:47 PM


All times are GMT +1. The time now is 03:45 PM.

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"