Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Copy and pasting files with macros
I have written some macros in an excel file and assigned these macros to
custom toolbar buttons. This works great until I copy and paste the file and open the new copy. The macro link for the buttons points to the original macro. Is there anyway to set this up so that I don't have to re-assign the macro every time and look at the open file instead. |
#2
|
|||
|
|||
Kevin
Difficult to tell without the code, but if it has an actual reference in the code to the workbook name, e.g.. Workbooks("OriginalBook")........... Then you would do better to use something like the ThisWorkbook object. This always points to the workbook containing the code. -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "Kevin" wrote in message ... I have written some macros in an excel file and assigned these macros to custom toolbar buttons. This works great until I copy and paste the file and open the new copy. The macro link for the buttons points to the original macro. Is there anyway to set this up so that I don't have to re-assign the macro every time and look at the open file instead. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
pasting into an excel template without losing the formatting | Excel Discussion (Misc queries) | |||
Copy conditional formatting across multiple rows? | Excel Discussion (Misc queries) | |||
Copy and pasting graphs to PowerPoint | Excel Discussion (Misc queries) | |||
Copy and Paste | Excel Discussion (Misc queries) |