LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
JMB
 
Posts: n/a
Default

You will need to edit the macro code. Go to Tools/Macro/Visual Basic Editor.

You will see a project window listing the open workbooks. Find your
workbook and you'll see a folder called "Modules" under it. Expand this
folder and look through the modules to find your macro.

If you used the macro recorder to make your macro, the macro will likely
reference your workbook as Windows(workbook name).Activate - with your
workbook name in quotes (or it could be Workbooks(workbook name).Activate).
Either way, wherever it references your workbook, you can change it to
ThisWorkbook.Activate (no quotes) Then it will not matter what your workbook
is named as Excel will know which workbook is running the macro.





"ynissel" wrote:

My issue is that I have a macro to copy data from one file to another - but
the first file can have different names.
So - How do I create a macro in Excel to save the file with a new file name,
or how do I make the file that I start the macro in - read the current file
name into the macro so it keeps toggling back to this file. The second file
will always have the same name.

Thanks,
Yosef

 
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 to save file automaticaly? david Excel Discussion (Misc queries) 1 May 6th 05 05:21 PM
How to stop getting the file save box when running a macro Pank Mehta Excel Discussion (Misc queries) 1 March 29th 05 04:05 PM
Excell2003 (SP-1) File > Save and File > Save As.. grayed out Joe Murphy Excel Discussion (Misc queries) 0 March 9th 05 10:00 PM
This one is tricky....Macro to save file as cell value x in di Andy Excel Discussion (Misc queries) 4 November 26th 04 08:52 AM
Macro did not run after download file from net ariffin Excel Worksheet Functions 2 November 6th 04 01:20 AM


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