Hi everyone,
OK heres what I'm trying to do:
I have a workbook (wrkbook1) with code that opens another workbook(wrkbook2), and copies one of the sheets to wrkbook1. The sheet i am copying is named "copysheet" and contains a piece of code called "buttonclick".
after the sheet is copy, the same running macro tries to call "buttonclick". I thought it should work because if the worksheet opens and copies, the code will be there. BUT, the macro stops before it does anything because it cant find the "buttonclick" macro! (this is ofcourse because the sheet with the code hasnt been copied yet) I get the error not defined.
Is there a way to make the macro run anyway, then it "SHOULD" work?
Thanks
OK heres what I'm trying to do:
I have a workbook (wrkbook1) with code that opens another workbook(wrkbook2), and copies one of the sheets to wrkbook1. The sheet i am copying is named "copysheet" and contains a piece of code called "buttonclick".
after the sheet is copy, the same running macro tries to call "buttonclick". I thought it should work because if the worksheet opens and copies, the code will be there. BUT, the macro stops before it does anything because it cant find the "buttonclick" macro! (this is ofcourse because the sheet with the code hasnt been copied yet) I get the error not defined.
Is there a way to make the macro run anyway, then it "SHOULD" work?
Thanks