Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refresh pivot table in workbook A when changing a cell in workbook gildengorin Excel Worksheet Functions 2 March 17th 09 04:59 PM
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook Ruchir Excel Worksheet Functions 1 July 25th 08 07:29 AM
Select sheet tabs in workbook & save to separate workbook files stratocaster Excel Worksheet Functions 2 March 1st 06 03:35 PM
Open a password protected excel workbook from second workbook to fetch data using dynamic connection kaustav choudhury Excel Programming 2 April 3rd 04 06:18 AM
What commands do you use to name a workbook, save a workbook,open a workbook Steven R. Berke Excel Programming 1 July 24th 03 11:37 PM


All times are GMT +1. The time now is 10:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"