Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
What's in a (macro) NAME?
Hi Tom.....
Thanks for the explanation, and it pretty much seems to be that way (here in XL97land) if I go to Tools Macros from within the VBE, but if I do it from the worksheet, it's a different story, more like what I described, with apparently arbituary assignment of the prefix's. I just wrote two different Application.Run statements calling in two different SubRoutines from two different modules, both in the active project. One worked fine, and the other gave error msg, "cant find the macro". When I copied and pasted the macro over to the same module as the Application.Run statement, it worked fine......When I looked at the errant macro's original name from the worksheet Tools Macros, the MacroName had the prefix of the WorkbookName. Any other thoughts? Vaya con Dios, Chuck ( "Smith XVI, of Florida"<G), CABGx3 "Tom Ogilvy" wrote: Only the macros in the activeworkbook do not have additional prepended information. The minimum information to identify the macro uniquely is included. If you have two macros with the same name in different modules, then you will get the module name prepended as an example. Same for application.run. If it isn't in the activeproject or in the thisworkbook workbook, then you have to use the workbook name. In 1st grade, if there was only one Chuck, the teacher said "Chuck". If two, perhaps "Chuck Smith" and if the father were present and one was a junior, "Chuck Smith, Jr" Same for excel. -- Regards, Tom Ogilvy "CLR" wrote in message ... Hi All...... When I do Tools Macro Macros, I get a nice list of all my macros. Only thing is, some of them are named just the name I gave them, and some include the FileName and/or ModuleName as a prefix. I don't like this, and "Application.Run ("MacroName") will not find the macro unless I include that prefix, which of course I do not want to do..........any way I can keep the Editor from assigning these prefix's, or deleting them and/or renaming the macros so the new names will stick? TIA Vaya con Dios, Chuck, CABGx3 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |