ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ocde in a different workbook (https://www.excelbanter.com/excel-programming/297225-ocde-different-workbook.html)

terry freedman

ocde in a different workbook
 
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

Bernie Deitrick

ocde in a different workbook
 
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 freedman" wrote in message
...
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 freedman

ocde in a different workbook
 
On Tue, 4 May 2004 21:00:20 -0400, "Bernie Deitrick" <deitbe @
consumer dot org wrote:

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" wrote in message
.. .
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 Freedman
www.ictineducation.org

Bernie Deitrick

ocde in a different workbook
 
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" wrote in message
...
On Tue, 4 May 2004 21:00:20 -0400, "Bernie Deitrick" <deitbe @
consumer dot org wrote:

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" wrote in message
.. .
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 Freedman
www.ictineducation.org




terry freedman

ocde in a different workbook
 
thanks, Bernie

On Wed, 5 May 2004 08:25:04 -0400, "Bernie Deitrick" <deitbe @
consumer dot org wrote:

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" wrote in message
.. .
On Tue, 4 May 2004 21:00:20 -0400, "Bernie Deitrick" <deitbe @
consumer dot org wrote:

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" wrote in message
.. .
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 Freedman
www.ictineducation.org



==
Terry Freedman
www.ictineducation.org


All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com