ocde in a different workbook

T

terry freedman

Hi

I created some VBA code ina spreadsheet, and then renamed the
spreadsheet, and now whenever I try to run the macros it looks for
them in the original spreadsheet. I have tried deleting the module and
then inserting a new one and pasting the code back in, but nothing
seems to work.

HELP!!!

TIA
Terry
==
Terry Freedman
www.ictineducation.org
 
B

Bernie Deitrick

Terry,

How are you calling the code? From a commandbutton, or ActiveX control, MS
Form, or through other code? Where does the code reside?

HTH,
Bernie
MS Excel MVP
 
T

terry freedman

Terry,

How are you calling the code? From a commandbutton, or ActiveX control, MS
Form, or through other code? Where does the code reside?


Hi, Bernie
I wrote the code in the VBA section (ie alt-F11), and am calling it
from both a custom menu and a command button (well, actually a shape
with a macro assigned to it)

Thanks
Terry


HTH,
Bernie
MS Excel MVP

==
Terry Freedman
www.ictineducation.org
 
B

Bernie Deitrick

Terry,

You will need to open your new workbook, then change the onaction properties
of both the commandbutton (right-click on any commandbar, choose
Customize..., then right click on the button and choose Assign Macro...) and
the shape (using r-click, Assign macro...) to the macro again.

HTH,
Bernie
MS Excel MVP
 
T

terry freedman

thanks, Bernie

Terry,

You will need to open your new workbook, then change the onaction properties
of both the commandbutton (right-click on any commandbar, choose
Customize..., then right click on the button and choose Assign Macro...) and
the shape (using r-click, Assign macro...) to the macro again.

HTH,
Bernie
MS Excel MVP

==
Terry Freedman
www.ictineducation.org
 
Top