Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto Refresh data from original worksheet to newly created copy | Excel Discussion (Misc queries) | |||
Datestamping a file created by a macro | Excel Discussion (Misc queries) | |||
Auto save replaced my original file and now I need the original? | Excel Discussion (Misc queries) | |||
Deleting a file, created by macro | Excel Programming | |||
Macro to run when file is created from a template | Excel Programming |