Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default moving xls files with macros to another directory?

I have been working on an excel file that was located on my desktop. I
elected to move it to a directory in C:/programs/whateverfolder

When i open the file located in the program directory and try to use the
macros that were written while the file was on the desktop i get an error
saying that macro x cannot be located and gives me the location of the
original excel xls file on the desktop.

How do i correct this problem. Is there a way to make the macros work where
ever that i put the xls file?

help???

--
dr chuck


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default moving xls files with macros to another directory?

The macros probably work fine.
You've probably created buttons/icons to simplify your life...BUT...when you
created the buttons, you pointed them at the file that was located on the
desktop.
The only way I know to correct this problem permanently is to create the
buttons each time you open the file and delete them each time you close the
file.

John Walkenbach has some great books on Programming with VBA
(http://j-walk.com/ss/books/index.htm) that you might want to take a look at.

Good Luck.
Sincerely,
--
Gary Brown

If this post was helpful to you, please select 'YES' at the bottom of the
post.



"dr chuck" wrote:

I have been working on an excel file that was located on my desktop. I
elected to move it to a directory in C:/programs/whateverfolder

When i open the file located in the program directory and try to use the
macros that were written while the file was on the desktop i get an error
saying that macro x cannot be located and gives me the location of the
original excel xls file on the desktop.

How do i correct this problem. Is there a way to make the macros work where
ever that i put the xls file?

help???

--
dr chuck


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default moving xls files with macros to another directory?

thanks gary.

you are exactly right about the buttons directed at macros on the desktop.
So if i understand you correctly if i move the xls file to its final location
and then reassign the buttons.. and not move the file any more then all
should be well when using the buttons in the permanent location...?

thanks lots
--
dr chuck


"Gary Brown" wrote:

The macros probably work fine.
You've probably created buttons/icons to simplify your life...BUT...when you
created the buttons, you pointed them at the file that was located on the
desktop.
The only way I know to correct this problem permanently is to create the
buttons each time you open the file and delete them each time you close the
file.

John Walkenbach has some great books on Programming with VBA
(http://j-walk.com/ss/books/index.htm) that you might want to take a look at.

Good Luck.
Sincerely,
--
Gary Brown

If this post was helpful to you, please select 'YES' at the bottom of the
post.



"dr chuck" wrote:

I have been working on an excel file that was located on my desktop. I
elected to move it to a directory in C:/programs/whateverfolder

When i open the file located in the program directory and try to use the
macros that were written while the file was on the desktop i get an error
saying that macro x cannot be located and gives me the location of the
original excel xls file on the desktop.

How do i correct this problem. Is there a way to make the macros work where
ever that i put the xls file?

help???

--
dr chuck


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default moving xls files with macros to another directory?

Yes. [But never ('not move the file any more') is a long time. :O]

--
Gary Brown

"dr chuck" wrote:

thanks gary.

you are exactly right about the buttons directed at macros on the desktop.
So if i understand you correctly if i move the xls file to its final location
and then reassign the buttons.. and not move the file any more then all
should be well when using the buttons in the permanent location...?

thanks lots
--
dr chuck


"Gary Brown" wrote:

The macros probably work fine.
You've probably created buttons/icons to simplify your life...BUT...when you
created the buttons, you pointed them at the file that was located on the
desktop.
The only way I know to correct this problem permanently is to create the
buttons each time you open the file and delete them each time you close the
file.

John Walkenbach has some great books on Programming with VBA
(http://j-walk.com/ss/books/index.htm) that you might want to take a look at.

Good Luck.
Sincerely,
--
Gary Brown

If this post was helpful to you, please select 'YES' at the bottom of the
post.



"dr chuck" wrote:

I have been working on an excel file that was located on my desktop. I
elected to move it to a directory in C:/programs/whateverfolder

When i open the file located in the program directory and try to use the
macros that were written while the file was on the desktop i get an error
saying that macro x cannot be located and gives me the location of the
original excel xls file on the desktop.

How do i correct this problem. Is there a way to make the macros work where
ever that i put the xls file?

help???

--
dr chuck


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
Stop directory & folders changing in link when moving file - Bella Excel Programming 0 July 14th 05 04:13 PM
Files in a directory? Greg B Excel Discussion (Misc queries) 5 May 11th 05 09:46 PM
where is the default directory of excel macros ? excel macros Excel Discussion (Misc queries) 2 January 21st 05 07:16 PM
Macro moving a directory with XP Peter Excel Programming 0 February 2nd 04 07:46 PM
Check if directory empty OR no of files in directory. Michael Beckinsale Excel Programming 2 December 4th 03 10:12 PM


All times are GMT +1. The time now is 10:21 PM.

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"