Macro name issue

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
 
B

Bill Renaud

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.
 
D

Dave Peterson

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.
 
J

JP

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 -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top