Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default What's in a (macro) NAME?

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default What's in a (macro) NAME?

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default What's in a (macro) NAME?

Chuck,

You are seeing some macros that are in the activeworkbook (those without a
prefix), and some in other workbooks (with a prefix). It cannot be avoided.

You need to specify the prefix with Application.Run if the macro is in
another workbook, can't be avoided.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"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



  #4   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default 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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default What's in a (macro) NAME?

It isn't arbitrary. In excel itself it is dependent on the activeworkbook.
Look at it. Change activeworkbooks and look again.

If it can't find the macro it is because you have not specified where it is
located. Nothing has changed from my explanation. Maybe my explanation is
not clear but it seems clear to me.

--
Regards,
Tom Ogilvy

"CLR" wrote in message
...
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








  #6   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default What's in a (macro) NAME?

Tom.....

Thanks for your patience, perhaps it was I who was not clear.
What I really meant to say was:
1- I removed my Personal.xls file and have NO other workbooks open.
2- When I open the VBE and then do Tools Macro Macros, I get the list of
all macros within the current WorkBook, without any prefix's.
3- When I switch to the normal WorkSheet view, and then do Tools Macro
Macros, three of the 53 macros now have Prefix's, and they elude to the
EXISTING WorkBook, not some other one that's not open.
4- This has happened to me on many other occasions also, and has caused much
grief when changing the Name of the WorkBook, which I do frequently.
Sometimes the OLD workbook name remains in the prefix, and sometimes it
changes to the new workbook name.

It would be great if it worked as you describe it "should", but it don't.
Do I maybe have a corrupt install of Excel?

Oh yeah, one other thing I noticed is that all three of the ones that have
these prefix's are ones that I have assigned to Objects to act as "start
buttons". Although I do have other macros assigned to other "buttons" that
do not display the prefix's.

Vaya con Dios,
Chuck, CABGx3



"Tom Ogilvy" wrote:

It isn't arbitrary. In excel itself it is dependent on the activeworkbook.
Look at it. Change activeworkbooks and look again.

If it can't find the macro it is because you have not specified where it is
located. Nothing has changed from my explanation. Maybe my explanation is
not clear but it seems clear to me.

--
Regards,
Tom Ogilvy

"CLR" wrote in message
...
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







  #7   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default What's in a (macro) NAME?

Hi Bob......

Thanks for responding.........It would be nice if it worked the way it
"should", but it don't. Please see my recent post to Tom for a more detailed
explanation of what I am finding wrong.

Vaya con Dios,
Chuck, CABGx3



"Bob Phillips" wrote:

Chuck,

You are seeing some macros that are in the activeworkbook (those without a
prefix), and some in other workbooks (with a prefix). It cannot be avoided.

You need to specify the prefix with Application.Run if the macro is in
another workbook, can't be avoided.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"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




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default What's in a (macro) NAME?

I haven't experienced these type of problems - but if it works that way for
you, there isn't going to be a way to change it I wouldn't think.

--
Regards,
Tom Ogilvy


"CLR" wrote in message
...
Tom.....

Thanks for your patience, perhaps it was I who was not clear.
What I really meant to say was:
1- I removed my Personal.xls file and have NO other workbooks open.
2- When I open the VBE and then do Tools Macro Macros, I get the list

of
all macros within the current WorkBook, without any prefix's.
3- When I switch to the normal WorkSheet view, and then do Tools Macro
Macros, three of the 53 macros now have Prefix's, and they elude to the
EXISTING WorkBook, not some other one that's not open.
4- This has happened to me on many other occasions also, and has caused

much
grief when changing the Name of the WorkBook, which I do frequently.
Sometimes the OLD workbook name remains in the prefix, and sometimes it
changes to the new workbook name.

It would be great if it worked as you describe it "should", but it don't.
Do I maybe have a corrupt install of Excel?

Oh yeah, one other thing I noticed is that all three of the ones that have
these prefix's are ones that I have assigned to Objects to act as "start
buttons". Although I do have other macros assigned to other "buttons"

that
do not display the prefix's.

Vaya con Dios,
Chuck, CABGx3



"Tom Ogilvy" wrote:

It isn't arbitrary. In excel itself it is dependent on the

activeworkbook.
Look at it. Change activeworkbooks and look again.

If it can't find the macro it is because you have not specified where it

is
located. Nothing has changed from my explanation. Maybe my

explanation is
not clear but it seems clear to me.

--
Regards,
Tom Ogilvy

"CLR" wrote in message
...
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









  #9   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default What's in a (macro) NAME?

Ok, thanks Tom.....

This is XL97 here, I'll try it at home on 2k and see if there is any
difference. I've had other issues with jumping back and forth between the
two, maybe this is another of them.

Thanks again,
Vaya con Dios,
Chuck, CABGx3



"Tom Ogilvy" wrote:

I haven't experienced these type of problems - but if it works that way for
you, there isn't going to be a way to change it I wouldn't think.

--
Regards,
Tom Ogilvy


"CLR" wrote in message
...
Tom.....

Thanks for your patience, perhaps it was I who was not clear.
What I really meant to say was:
1- I removed my Personal.xls file and have NO other workbooks open.
2- When I open the VBE and then do Tools Macro Macros, I get the list

of
all macros within the current WorkBook, without any prefix's.
3- When I switch to the normal WorkSheet view, and then do Tools Macro
Macros, three of the 53 macros now have Prefix's, and they elude to the
EXISTING WorkBook, not some other one that's not open.
4- This has happened to me on many other occasions also, and has caused

much
grief when changing the Name of the WorkBook, which I do frequently.
Sometimes the OLD workbook name remains in the prefix, and sometimes it
changes to the new workbook name.

It would be great if it worked as you describe it "should", but it don't.
Do I maybe have a corrupt install of Excel?

Oh yeah, one other thing I noticed is that all three of the ones that have
these prefix's are ones that I have assigned to Objects to act as "start
buttons". Although I do have other macros assigned to other "buttons"

that
do not display the prefix's.

Vaya con Dios,
Chuck, CABGx3



"Tom Ogilvy" wrote:

It isn't arbitrary. In excel itself it is dependent on the

activeworkbook.
Look at it. Change activeworkbooks and look again.

If it can't find the macro it is because you have not specified where it

is
located. Nothing has changed from my explanation. Maybe my

explanation is
not clear but it seems clear to me.

--
Regards,
Tom Ogilvy

"CLR" wrote in message
...
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










  #10   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default What's in a (macro) NAME?

Hi All..........
Just for the record, I get the same thing at home on Excel2k that I got at
work on Excel97. The only thing that's the same between the two
installations, is the File itself which I brought home on my pocket Jump
Drive.

Vaya con Dios,
Chuck, CABGx3



"CLR" wrote in message
...
Ok, thanks Tom.....

This is XL97 here, I'll try it at home on 2k and see if there is any
difference. I've had other issues with jumping back and forth between the
two, maybe this is another of them.

Thanks again,
Vaya con Dios,
Chuck, CABGx3



"Tom Ogilvy" wrote:

I haven't experienced these type of problems - but if it works that way

for
you, there isn't going to be a way to change it I wouldn't think.

--
Regards,
Tom Ogilvy


"CLR" wrote in message
...
Tom.....

Thanks for your patience, perhaps it was I who was not clear.
What I really meant to say was:
1- I removed my Personal.xls file and have NO other workbooks open.
2- When I open the VBE and then do Tools Macro Macros, I get the

list
of
all macros within the current WorkBook, without any prefix's.
3- When I switch to the normal WorkSheet view, and then do Tools

Macro
Macros, three of the 53 macros now have Prefix's, and they elude to

the
EXISTING WorkBook, not some other one that's not open.
4- This has happened to me on many other occasions also, and has

caused
much
grief when changing the Name of the WorkBook, which I do frequently.
Sometimes the OLD workbook name remains in the prefix, and sometimes

it
changes to the new workbook name.

It would be great if it worked as you describe it "should", but it

don't.
Do I maybe have a corrupt install of Excel?

Oh yeah, one other thing I noticed is that all three of the ones that

have
these prefix's are ones that I have assigned to Objects to act as

"start
buttons". Although I do have other macros assigned to other "buttons"

that
do not display the prefix's.

Vaya con Dios,
Chuck, CABGx3



"Tom Ogilvy" wrote:

It isn't arbitrary. In excel itself it is dependent on the

activeworkbook.
Look at it. Change activeworkbooks and look again.

If it can't find the macro it is because you have not specified

where it
is
located. Nothing has changed from my explanation. Maybe my

explanation is
not clear but it seems clear to me.

--
Regards,
Tom Ogilvy

"CLR" wrote in message
...
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
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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 11:10 AM.

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"