Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Why is my macro looking for the original file I created it on?

I created a macro that was to sort through records and give two different
formats depending on what was located in column C. When I tried to export
the macro as an xla file so others can use it as an independant macro, it
didn't work as I intended it to. I had to first enable the macro, and
afterwards it looked for the file that I had created the macro on. When I
took the file out of the directory, it gave an error message saying that it
couldn't find the file. How do I configure the macro so that it doesn't try
to look for that file?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Why is my macro looking for the original file I created it on?

You assigned your macro to a button or an item on a commandbar.

That button/item still pointed to the original workbook--not the .xla.

I think that the easiest thing to do is to assign the macro to the button when
your .xla file opens.

If you want to add an option to the worksheet menu bar, I really like the way
John Walkenbach does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

Brett Smith wrote:

I created a macro that was to sort through records and give two different
formats depending on what was located in column C. When I tried to export
the macro as an xla file so others can use it as an independant macro, it
didn't work as I intended it to. I had to first enable the macro, and
afterwards it looked for the file that I had created the macro on. When I
took the file out of the directory, it gave an error message saying that it
couldn't find the file. How do I configure the macro so that it doesn't try
to look for that file?


--

Dave Peterson
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
Auto Refresh data from original worksheet to newly created copy wolverine Excel Discussion (Misc queries) 0 April 11th 10 04:10 PM
Datestamping a file created by a macro michaelberrier Excel Discussion (Misc queries) 2 June 1st 06 12:41 AM
Auto save replaced my original file and now I need the original? Hols Excel Discussion (Misc queries) 1 August 15th 05 10:34 PM
Deleting a file, created by macro CLR[_2_] Excel Programming 3 June 21st 04 07:27 PM
Macro to run when file is created from a template Jim Birch Excel Programming 2 February 19th 04 03:33 AM


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

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

About Us

"It's about Microsoft Excel"