I have a VBA module in excel which is accessed via a button on the page. I am programatically copying this page and the code module to a new workbook. Everything is fine EXCEPT when I click the button, it tries to access the macro in the original book, not in the cloned book. I know how to change it manually, BUT I will be distributing this function to others, so I must be able to change it programatically when I clone the worksheet.
Function:
User opens file and envokes main macro
Main macro creates new workbook and clones worksheet
Main macro copies aux macro into new workbook
Main macro populates new workbook with data
Main macro exits
User is now left with a valid XLS workbook ... the only problem is that the button still points to original workbook.
Buz