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: 1
Default Use one Macro on multiple workbooks

I have a number of workbooks, each containing a database with identical sheet
layouts. I want to use a single macro to copy a group of formulas from one
workbook (Formulas.xls) that will copy to and then run against any of the
databases (ex. 090918.xls).
I have written a macro that works (test 4), but it only works on one database.
Is there a way to have the macro select €œActiveWorkbook€ instead of the
specific workbook I used when I wrote the macro? See underlined example
below:

' Test4 Macro
' Macro recorded 3/9/2009 by Ralph Forbes
'
' Keyboard Shortcut: Ctrl+z
'
Windows("Formulas.XLS").Activate
Range("L15:Q17").Select
Selection.Copy
Windows("090918.xls").Activate
ActiveSheet.Paste
Range("L17:Q17").Select
Application.CutCopyMode = False

Thank you,
Ralph Forbes

 
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
Multiple Workbooks using same macro Bing59 Excel Discussion (Misc queries) 4 January 24th 10 03:38 AM
Need Help Creating a Macro Multiple Workbooks to One Howeecow Excel Worksheet Functions 1 June 7th 07 06:20 PM
macro: copy multiple workbooks to multiple tabs in single book Michael Excel Programming 0 July 14th 06 04:53 PM
Running the same macro to multiple workbooks Raman325[_11_] Excel Programming 0 July 1st 05 04:48 PM
Accessing multiple workbooks through a macro Raman325 Excel Programming 6 June 29th 05 05:28 PM


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