Macro name issue

  • Thread starter Thread starter JP
  • Start date Start date
J

JP

Hi all,

I keep most of my macros in individual modules in my personal
workbook. When I hit Alt-F8 to run a macro, some of the names are
doubled, for example

PERSONAL.XLS!Generic_Sort1

while others are listed as

PERSONAL.XLS!GetAverageNum.GetAverageNum

I thought it was only the macros in their own separate modules, but
some of the "one macro modules" are also listed like this. This
affects the way I call macros from other modules as I have to list the
name twice with a period "." in-between. Any idea why some macros are
like this?


Thx,
JP
 
Sounds like you are naming your code modules with the same name as the
subroutine. So in module 'GetAverageNum', you have a subroutine or function
also named 'GetAverageNum'?

Try naming your standard code module something like 'modMacros' or
'modMathFunctions', then put all of your macros in this single module.
 
Just to add to Bill's response...

If you don't change the names of the modules, you'll find that excel can have
trouble finding the function.

I guess my point is that I want to make Bill's advice mandatory.
 
I'll try it out, thanks guys

--JP


Just to add to Bill's response...

If you don't change the names of the modules, you'll find that excel can have
trouble finding the function.

I guess my point is that I want to make Bill's advice mandatory.








--

Dave Peterson- Hide quoted text -

- Show quoted text -
 
Back
Top