LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default run a macro on an in-active workbook

Is there any way to get a macro to execute on a workbook
which is open, but not active?

I have a macro in a certain workbook (call it "A")which
repeats automatically but if I I open another workbook,
say "B", then the macro produces an error because it
doesn't find the data it needs in the active worksheet if
I'm working in "B".

I've added the following code to the start of my macro

Workbooks("hilowwork book.xls").Activate
Worksheets("UpdateInfo").Activate

and the macro runs fine but it causes the sheet to become
active and it interrupts the work I may be doing in
workbook "B".

Is there some way I can feed the macro the information of
the workbook name and sheet name that it is to operate on
so that it does this in the background and still allows
me to continue working in workbook "B" without
interruption?

 
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
Active Workbook Kim Excel Discussion (Misc queries) 8 June 1st 10 11:33 PM
Macro to update active workbook in one folder Mike @ GD Excel Worksheet Functions 8 January 15th 09 02:19 PM
Macro to copy active worksheet to new workbook Macca Excel Discussion (Misc queries) 1 May 25th 08 02:07 PM
Macro: Exit active workbook without save? Don Excel Worksheet Functions 0 May 20th 05 06:47 AM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM


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