ocde in a different workbook

  • Thread starter Thread starter terry freedman
  • Start date Start date
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
 
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
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top