Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Macro name issue

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default Macro name issue

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.

--
Regards,
Bill Renaud



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro name issue

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.

JP wrote:

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


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default Macro name issue

I'll try it out, thanks guys

--JP


On Oct 30, 8:23 pm, Dave Peterson wrote:
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.





JP wrote:

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


--

Dave Peterson- Hide quoted text -

- Show quoted text -



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
Issue with a macro juancarlos Excel Discussion (Misc queries) 18 September 17th 09 09:41 PM
Macro issue Farhad Excel Discussion (Misc queries) 5 December 21st 08 06:05 PM
Macro issue Steved Excel Programming 4 May 24th 06 10:08 AM
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet wyndman Excel Programming 2 May 25th 04 06:59 PM
Macro Issue alexm999[_9_] Excel Programming 2 January 29th 04 10:46 PM


All times are GMT +1. The time now is 12:10 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"