ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Newbie- Filename referencing in macros (https://www.excelbanter.com/excel-programming/308081-newbie-filename-referencing-macros.html)

Ellen

Newbie- Filename referencing in macros
 
I edited an Excel File with macros, saved a copy of the
file with a new
filename, and then found the macros in the new file are
attempting to call
the procedures from the original file, and returning the
error "file
specified cannot be found", or something to that effect.

Am I omitting something when I am saving a file with a
new filename with
macros?
I can see all the macros in the new file when I check for
them, but it's as
though I need to remap the commandbuttons to the macros
in the current file.

Thanks in advance, Ellen

Jim Becker

Newbie- Filename referencing in macros
 
In the new file, select Edit - Links, then Change Source.
In the dialog box select the new file and OK. This will
cause the buttons to look for the macros in the new file,
assuming the macro names haven't changed.
--
Hope this helps,
James dot Becker at NCR dot com
~
~
~
:wq!

"Ellen" wrote in message
...
I edited an Excel File with macros, saved a copy of the
file with a new
filename, and then found the macros in the new file are
attempting to call
the procedures from the original file, and returning the
error "file
specified cannot be found", or something to that effect.

Am I omitting something when I am saving a file with a
new filename with
macros?
I can see all the macros in the new file when I check for
them, but it's as
though I need to remap the commandbuttons to the macros
in the current file.

Thanks in advance, Ellen




JK

Newbie- Filename referencing in macros
 
Ellen;

Try this:

Sub SaveIt()
ActiveWorkbook.Save
End Sub

Regards,
Jim Kobzeff
"Ellen" wrote in message
...
I edited an Excel File with macros, saved a copy of the
file with a new
filename, and then found the macros in the new file are
attempting to call
the procedures from the original file, and returning the
error "file
specified cannot be found", or something to that effect.

Am I omitting something when I am saving a file with a
new filename with
macros?
I can see all the macros in the new file when I check for
them, but it's as
though I need to remap the commandbuttons to the macros
in the current file.

Thanks in advance, Ellen




Ellen

Newbie- Filename referencing in macros
 
Thank you! To Both of you! I'll check them out! Much
appreciated! Ellen
-----Original Message-----
I edited an Excel File with macros, saved a copy of the
file with a new
filename, and then found the macros in the new file are
attempting to call
the procedures from the original file, and returning the
error "file
specified cannot be found", or something to that effect.

Am I omitting something when I am saving a file with a
new filename with
macros?
I can see all the macros in the new file when I check

for
them, but it's as
though I need to remap the commandbuttons to the macros
in the current file.

Thanks in advance, Ellen
.


Ellen

Newbie- Filename referencing in macros
 
THANK YOU!
-----Original Message-----
In the new file, select Edit - Links, then Change

Source.
In the dialog box select the new file and OK. This will
cause the buttons to look for the macros in the new file,
assuming the macro names haven't changed.
--
Hope this helps,
James dot Becker at NCR dot com
~
~
~
:wq!

"Ellen" wrote in

message
...
I edited an Excel File with macros, saved a copy of the
file with a new
filename, and then found the macros in the new file are
attempting to call
the procedures from the original file, and returning

the
error "file
specified cannot be found", or something to that

effect.

Am I omitting something when I am saving a file with a
new filename with
macros?
I can see all the macros in the new file when I check

for
them, but it's as
though I need to remap the commandbuttons to the macros
in the current file.

Thanks in advance, Ellen



.


Ellen

Newbie- Filename referencing in macros
 
THANK YOU!
-----Original Message-----
Ellen;

Try this:

Sub SaveIt()
ActiveWorkbook.Save
End Sub

Regards,
Jim Kobzeff
"Ellen" wrote in

message
...
I edited an Excel File with macros, saved a copy of the
file with a new
filename, and then found the macros in the new file are
attempting to call
the procedures from the original file, and returning

the
error "file
specified cannot be found", or something to that

effect.

Am I omitting something when I am saving a file with a
new filename with
macros?
I can see all the macros in the new file when I check

for
them, but it's as
though I need to remap the commandbuttons to the macros
in the current file.

Thanks in advance, Ellen



.



All times are GMT +1. The time now is 11:31 PM.

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