PC Review


Reply
Thread Tools Rate Thread

Add-In Keyboard Shortcut

 
 
=?Utf-8?B?bXZ5dm9kYQ==?=
Guest
Posts: n/a
 
      10th Oct 2006
i am using an add-in to store macro's ("personal.xla" in C:\Documents and
Settings\mvyvoda\Application Data\Microsoft\AddIns). I need to have a
keyboard shortcut to one fuction within this add-in. The macro list (Alt-F8)
does not list any macro's in personal.xla.

i'm not even sure where to start.

thanks,
-m
 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      10th Oct 2006
Application.OnKey "+^D", "MyMacro"

This should create a shortcut Shift-Ctrl-D. If there's any possibility
MyMacro may exist in any other workbook prefix with ThisWorkbook.Name & "!".
Call it from an Open event.

Not sure about naming your addin "Personal.xla" if there may also be a
Personal.xls open, guess it's OK but I wouldn't.

Regards,
Peter T

"mvyvoda" <(E-Mail Removed)> wrote in message
newsC406180-E22C-41BC-B5D9-(E-Mail Removed)...
> i am using an add-in to store macro's ("personal.xla" in C:\Documents and
> Settings\mvyvoda\Application Data\Microsoft\AddIns). I need to have a
> keyboard shortcut to one fuction within this add-in. The macro list

(Alt-F8)
> does not list any macro's in personal.xla.
>
> i'm not even sure where to start.
>
> thanks,
> -m



 
Reply With Quote
 
=?Utf-8?B?bXZ5dm9kYQ==?=
Guest
Posts: n/a
 
      11th Oct 2006
Peter,

When I do this, and get rid of the menu already in place (but run your code)
I get an error:

The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found

do you what this means?

Thanks,
-m

"Peter T" wrote:

> Application.OnKey "+^D", "MyMacro"
>
> This should create a shortcut Shift-Ctrl-D. If there's any possibility
> MyMacro may exist in any other workbook prefix with ThisWorkbook.Name & "!".
> Call it from an Open event.
>
> Not sure about naming your addin "Personal.xla" if there may also be a
> Personal.xls open, guess it's OK but I wouldn't.
>
> Regards,
> Peter T
>
> "mvyvoda" <(E-Mail Removed)> wrote in message
> newsC406180-E22C-41BC-B5D9-(E-Mail Removed)...
> > i am using an add-in to store macro's ("personal.xla" in C:\Documents and
> > Settings\mvyvoda\Application Data\Microsoft\AddIns). I need to have a
> > keyboard shortcut to one fuction within this add-in. The macro list

> (Alt-F8)
> > does not list any macro's in personal.xla.
> >
> > i'm not even sure where to start.
> >
> > thanks,
> > -m

>
>
>

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      11th Oct 2006
Why do you "get rid of the menu already in place"

Is AddMenu a Sub with no arguments

Do you have a similarly named AddMenu sub in any other workbook (incl
addins), if so did you prefix the way I suggested.

Apart from your Personal.xla do you also have Personal.xls, if so try
renaming the addin.

Regards,
Peter T

"mvyvoda" <(E-Mail Removed)> wrote in message
news:5047FA80-1A39-40C9-98E5-(E-Mail Removed)...
> Peter,
>
> When I do this, and get rid of the menu already in place (but run your

code)
> I get an error:
>
> The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found
>
> do you what this means?
>
> Thanks,
> -m
>
> "Peter T" wrote:
>
> > Application.OnKey "+^D", "MyMacro"
> >
> > This should create a shortcut Shift-Ctrl-D. If there's any possibility
> > MyMacro may exist in any other workbook prefix with ThisWorkbook.Name &

"!".
> > Call it from an Open event.
> >
> > Not sure about naming your addin "Personal.xla" if there may also be a
> > Personal.xls open, guess it's OK but I wouldn't.
> >
> > Regards,
> > Peter T
> >
> > "mvyvoda" <(E-Mail Removed)> wrote in message
> > newsC406180-E22C-41BC-B5D9-(E-Mail Removed)...
> > > i am using an add-in to store macro's ("personal.xla" in C:\Documents

and
> > > Settings\mvyvoda\Application Data\Microsoft\AddIns). I need to have a
> > > keyboard shortcut to one fuction within this add-in. The macro list

> > (Alt-F8)
> > > does not list any macro's in personal.xla.
> > >
> > > i'm not even sure where to start.
> > >
> > > thanks,
> > > -m

> >
> >
> >



 
Reply With Quote
 
=?Utf-8?B?bXZ5dm9kYQ==?=
Guest
Posts: n/a
 
      11th Oct 2006
I got rid of the menu already in place to test to see if the ctrl+shift+D
would work if only personal.xla was in place and never ran. also, i did
rename the file, to no avail.

I don't have any other macro's that are similarly named.

AddMenu is a pretty typical routine that merely adds a menu, names it and
places arguments (attached to macros of course) within the menu.

Peter, I really appreciate all your help!!,
-m

"Peter T" wrote:

> Why do you "get rid of the menu already in place"
>
> Is AddMenu a Sub with no arguments
>
> Do you have a similarly named AddMenu sub in any other workbook (incl
> addins), if so did you prefix the way I suggested.
>
> Apart from your Personal.xla do you also have Personal.xls, if so try
> renaming the addin.
>
> Regards,
> Peter T
>
> "mvyvoda" <(E-Mail Removed)> wrote in message
> news:5047FA80-1A39-40C9-98E5-(E-Mail Removed)...
> > Peter,
> >
> > When I do this, and get rid of the menu already in place (but run your

> code)
> > I get an error:
> >
> > The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found
> >
> > do you what this means?
> >
> > Thanks,
> > -m
> >
> > "Peter T" wrote:
> >
> > > Application.OnKey "+^D", "MyMacro"
> > >
> > > This should create a shortcut Shift-Ctrl-D. If there's any possibility
> > > MyMacro may exist in any other workbook prefix with ThisWorkbook.Name &

> "!".
> > > Call it from an Open event.
> > >
> > > Not sure about naming your addin "Personal.xla" if there may also be a
> > > Personal.xls open, guess it's OK but I wouldn't.
> > >
> > > Regards,
> > > Peter T
> > >
> > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > newsC406180-E22C-41BC-B5D9-(E-Mail Removed)...
> > > > i am using an add-in to store macro's ("personal.xla" in C:\Documents

> and
> > > > Settings\mvyvoda\Application Data\Microsoft\AddIns). I need to have a
> > > > keyboard shortcut to one fuction within this add-in. The macro list
> > > (Alt-F8)
> > > > does not list any macro's in personal.xla.
> > > >
> > > > i'm not even sure where to start.
> > > >
> > > > thanks,
> > > > -m
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
=?Utf-8?B?bXZ5dm9kYQ==?=
Guest
Posts: n/a
 
      11th Oct 2006
oh... I misnamed AddMenu. It works now, however I have a final question. I
have a scenario whereby I need this ctrl+shift+D to work in a situation where
someone has never ran the AddMenu routine. Is this possible? Or, do I have to
run AddMenu with the added ctrl+shift+D code before they can use ctrl+shift+D?

If you follow?

Thanks,
-m

"mvyvoda" wrote:

> I got rid of the menu already in place to test to see if the ctrl+shift+D
> would work if only personal.xla was in place and never ran. also, i did
> rename the file, to no avail.
>
> I don't have any other macro's that are similarly named.
>
> AddMenu is a pretty typical routine that merely adds a menu, names it and
> places arguments (attached to macros of course) within the menu.
>
> Peter, I really appreciate all your help!!,
> -m
>
> "Peter T" wrote:
>
> > Why do you "get rid of the menu already in place"
> >
> > Is AddMenu a Sub with no arguments
> >
> > Do you have a similarly named AddMenu sub in any other workbook (incl
> > addins), if so did you prefix the way I suggested.
> >
> > Apart from your Personal.xla do you also have Personal.xls, if so try
> > renaming the addin.
> >
> > Regards,
> > Peter T
> >
> > "mvyvoda" <(E-Mail Removed)> wrote in message
> > news:5047FA80-1A39-40C9-98E5-(E-Mail Removed)...
> > > Peter,
> > >
> > > When I do this, and get rid of the menu already in place (but run your

> > code)
> > > I get an error:
> > >
> > > The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found
> > >
> > > do you what this means?
> > >
> > > Thanks,
> > > -m
> > >
> > > "Peter T" wrote:
> > >
> > > > Application.OnKey "+^D", "MyMacro"
> > > >
> > > > This should create a shortcut Shift-Ctrl-D. If there's any possibility
> > > > MyMacro may exist in any other workbook prefix with ThisWorkbook.Name &

> > "!".
> > > > Call it from an Open event.
> > > >
> > > > Not sure about naming your addin "Personal.xla" if there may also be a
> > > > Personal.xls open, guess it's OK but I wouldn't.
> > > >
> > > > Regards,
> > > > Peter T
> > > >
> > > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > > newsC406180-E22C-41BC-B5D9-(E-Mail Removed)...
> > > > > i am using an add-in to store macro's ("personal.xla" in C:\Documents

> > and
> > > > > Settings\mvyvoda\Application Data\Microsoft\AddIns). I need to have a
> > > > > keyboard shortcut to one fuction within this add-in. The macro list
> > > > (Alt-F8)
> > > > > does not list any macro's in personal.xla.
> > > > >
> > > > > i'm not even sure where to start.
> > > > >
> > > > > thanks,
> > > > > -m
> > > >
> > > >
> > > >

> >
> >
> >

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      11th Oct 2006
I'm glad you've got it working but not sure I understand your follow-up
question.

You need to run the code that assigns the shortcut to your AddMenu proc,
typically from an open event which might also add a menu. There's no need
for the proc to have run once before it will work from the shortcut.

It's unusual to have a shortcut that runs code to add menu items, at least I
assume that's what AddMenu does. More conventional would be to have both the
OnAction property of a menu item and your shortcut linked to a procedure
that starts some functional aspect of your addin.

Regards,
Peter T

"mvyvoda" <(E-Mail Removed)> wrote in message
news:C83E9F19-731B-4E59-941E-(E-Mail Removed)...
> oh... I misnamed AddMenu. It works now, however I have a final question. I
> have a scenario whereby I need this ctrl+shift+D to work in a situation

where
> someone has never ran the AddMenu routine. Is this possible? Or, do I have

to
> run AddMenu with the added ctrl+shift+D code before they can use

ctrl+shift+D?
>
> If you follow?
>
> Thanks,
> -m
>
> "mvyvoda" wrote:
>
> > I got rid of the menu already in place to test to see if the

ctrl+shift+D
> > would work if only personal.xla was in place and never ran. also, i did
> > rename the file, to no avail.
> >
> > I don't have any other macro's that are similarly named.
> >
> > AddMenu is a pretty typical routine that merely adds a menu, names it

and
> > places arguments (attached to macros of course) within the menu.
> >
> > Peter, I really appreciate all your help!!,
> > -m
> >
> > "Peter T" wrote:
> >
> > > Why do you "get rid of the menu already in place"
> > >
> > > Is AddMenu a Sub with no arguments
> > >
> > > Do you have a similarly named AddMenu sub in any other workbook (incl
> > > addins), if so did you prefix the way I suggested.
> > >
> > > Apart from your Personal.xla do you also have Personal.xls, if so try
> > > renaming the addin.
> > >
> > > Regards,
> > > Peter T
> > >
> > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > news:5047FA80-1A39-40C9-98E5-(E-Mail Removed)...
> > > > Peter,
> > > >
> > > > When I do this, and get rid of the menu already in place (but run

your
> > > code)
> > > > I get an error:
> > > >
> > > > The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found
> > > >
> > > > do you what this means?
> > > >
> > > > Thanks,
> > > > -m
> > > >
> > > > "Peter T" wrote:
> > > >
> > > > > Application.OnKey "+^D", "MyMacro"
> > > > >
> > > > > This should create a shortcut Shift-Ctrl-D. If there's any

possibility
> > > > > MyMacro may exist in any other workbook prefix with

ThisWorkbook.Name &
> > > "!".
> > > > > Call it from an Open event.
> > > > >
> > > > > Not sure about naming your addin "Personal.xla" if there may also

be a
> > > > > Personal.xls open, guess it's OK but I wouldn't.
> > > > >
> > > > > Regards,
> > > > > Peter T
> > > > >
> > > > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > > > newsC406180-E22C-41BC-B5D9-(E-Mail Removed)...
> > > > > > i am using an add-in to store macro's ("personal.xla" in

C:\Documents
> > > and
> > > > > > Settings\mvyvoda\Application Data\Microsoft\AddIns). I need to

have a
> > > > > > keyboard shortcut to one fuction within this add-in. The macro

list
> > > > > (Alt-F8)
> > > > > > does not list any macro's in personal.xla.
> > > > > >
> > > > > > i'm not even sure where to start.
> > > > > >
> > > > > > thanks,
> > > > > > -m
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >



 
Reply With Quote
 
=?Utf-8?B?bXZ5dm9kYQ==?=
Guest
Posts: n/a
 
      11th Oct 2006
From the users standpoint, I have a series of macro's that can only run from
a menu (as opposed to going into the code and running the macro). However,
each iteration of my .xla file (which stores the macro's) I change this menu.

So, I want to be able to automatically (via ctrl+shift+d sounds great!) to
change their pre-existing menu to the current one i worked on.

you say it's unconventional to have an entire module dedicated to adding a
menu (AddMenu). You also say you think it wise to add a menu from within
another module. Is that what you're saying? I'm not sure if I follow... this
line of thinking.

I also think i'm in way over my head :-/ But, it's pretty close....

thanks a lot for your time and effort!!!!,
-m

"Peter T" wrote:

> I'm glad you've got it working but not sure I understand your follow-up
> question.
>
> You need to run the code that assigns the shortcut to your AddMenu proc,
> typically from an open event which might also add a menu. There's no need
> for the proc to have run once before it will work from the shortcut.
>
> It's unusual to have a shortcut that runs code to add menu items, at least I
> assume that's what AddMenu does. More conventional would be to have both the
> OnAction property of a menu item and your shortcut linked to a procedure
> that starts some functional aspect of your addin.
>
> Regards,
> Peter T
>
> "mvyvoda" <(E-Mail Removed)> wrote in message
> news:C83E9F19-731B-4E59-941E-(E-Mail Removed)...
> > oh... I misnamed AddMenu. It works now, however I have a final question. I
> > have a scenario whereby I need this ctrl+shift+D to work in a situation

> where
> > someone has never ran the AddMenu routine. Is this possible? Or, do I have

> to
> > run AddMenu with the added ctrl+shift+D code before they can use

> ctrl+shift+D?
> >
> > If you follow?
> >
> > Thanks,
> > -m
> >
> > "mvyvoda" wrote:
> >
> > > I got rid of the menu already in place to test to see if the

> ctrl+shift+D
> > > would work if only personal.xla was in place and never ran. also, i did
> > > rename the file, to no avail.
> > >
> > > I don't have any other macro's that are similarly named.
> > >
> > > AddMenu is a pretty typical routine that merely adds a menu, names it

> and
> > > places arguments (attached to macros of course) within the menu.
> > >
> > > Peter, I really appreciate all your help!!,
> > > -m
> > >
> > > "Peter T" wrote:
> > >
> > > > Why do you "get rid of the menu already in place"
> > > >
> > > > Is AddMenu a Sub with no arguments
> > > >
> > > > Do you have a similarly named AddMenu sub in any other workbook (incl
> > > > addins), if so did you prefix the way I suggested.
> > > >
> > > > Apart from your Personal.xla do you also have Personal.xls, if so try
> > > > renaming the addin.
> > > >
> > > > Regards,
> > > > Peter T
> > > >
> > > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > > news:5047FA80-1A39-40C9-98E5-(E-Mail Removed)...
> > > > > Peter,
> > > > >
> > > > > When I do this, and get rid of the menu already in place (but run

> your
> > > > code)
> > > > > I get an error:
> > > > >
> > > > > The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found
> > > > >
> > > > > do you what this means?
> > > > >
> > > > > Thanks,
> > > > > -m
> > > > >
> > > > > "Peter T" wrote:
> > > > >
> > > > > > Application.OnKey "+^D", "MyMacro"
> > > > > >
> > > > > > This should create a shortcut Shift-Ctrl-D. If there's any

> possibility
> > > > > > MyMacro may exist in any other workbook prefix with

> ThisWorkbook.Name &
> > > > "!".
> > > > > > Call it from an Open event.
> > > > > >
> > > > > > Not sure about naming your addin "Personal.xla" if there may also

> be a
> > > > > > Personal.xls open, guess it's OK but I wouldn't.
> > > > > >
> > > > > > Regards,
> > > > > > Peter T
> > > > > >
> > > > > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > > > > newsC406180-E22C-41BC-B5D9-(E-Mail Removed)...
> > > > > > > i am using an add-in to store macro's ("personal.xla" in

> C:\Documents
> > > > and
> > > > > > > Settings\mvyvoda\Application Data\Microsoft\AddIns). I need to

> have a
> > > > > > > keyboard shortcut to one fuction within this add-in. The macro

> list
> > > > > > (Alt-F8)
> > > > > > > does not list any macro's in personal.xla.
> > > > > > >
> > > > > > > i'm not even sure where to start.
> > > > > > >
> > > > > > > thanks,
> > > > > > > -m
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >

>
>
>

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      11th Oct 2006
> you say it's unconventional to have an entire module dedicated to adding a
> menu (AddMenu).


No I didn't mean that (an entire module etc). I meant unusual to have a
shortcut to a procedure that in turn adds menu item(s), though I think I now
understand what you are doing.

I would suggest a different approach, and I'm assuming you are not deleting
the menus in the close event. In the tag property of your menus write
something that identifies your xla version, an id. In the open event try
setting a reference to your menus (under On Error Resume Next). If the id
refers to an old version delete it and create new menu(s). Also of course if
the menu doesn't exist create the menu.

Regards,
Peter T

"mvyvoda" <(E-Mail Removed)> wrote in message
news:6024A9C2-67B4-434A-97C1-(E-Mail Removed)...
> From the users standpoint, I have a series of macro's that can only run

from
> a menu (as opposed to going into the code and running the macro). However,
> each iteration of my .xla file (which stores the macro's) I change this

menu.
>
> So, I want to be able to automatically (via ctrl+shift+d sounds great!) to
> change their pre-existing menu to the current one i worked on.
>
> you say it's unconventional to have an entire module dedicated to adding a
> menu (AddMenu). You also say you think it wise to add a menu from within
> another module. Is that what you're saying? I'm not sure if I follow...

this
> line of thinking.
>
> I also think i'm in way over my head :-/ But, it's pretty close....
>
> thanks a lot for your time and effort!!!!,
> -m
>
> "Peter T" wrote:
>
> > I'm glad you've got it working but not sure I understand your follow-up
> > question.
> >
> > You need to run the code that assigns the shortcut to your AddMenu proc,
> > typically from an open event which might also add a menu. There's no

need
> > for the proc to have run once before it will work from the shortcut.
> >
> > It's unusual to have a shortcut that runs code to add menu items, at

least I
> > assume that's what AddMenu does. More conventional would be to have both

the
> > OnAction property of a menu item and your shortcut linked to a procedure
> > that starts some functional aspect of your addin.
> >
> > Regards,
> > Peter T
> >
> > "mvyvoda" <(E-Mail Removed)> wrote in message
> > news:C83E9F19-731B-4E59-941E-(E-Mail Removed)...
> > > oh... I misnamed AddMenu. It works now, however I have a final

question. I
> > > have a scenario whereby I need this ctrl+shift+D to work in a

situation
> > where
> > > someone has never ran the AddMenu routine. Is this possible? Or, do I

have
> > to
> > > run AddMenu with the added ctrl+shift+D code before they can use

> > ctrl+shift+D?
> > >
> > > If you follow?
> > >
> > > Thanks,
> > > -m
> > >
> > > "mvyvoda" wrote:
> > >
> > > > I got rid of the menu already in place to test to see if the

> > ctrl+shift+D
> > > > would work if only personal.xla was in place and never ran. also, i

did
> > > > rename the file, to no avail.
> > > >
> > > > I don't have any other macro's that are similarly named.
> > > >
> > > > AddMenu is a pretty typical routine that merely adds a menu, names

it
> > and
> > > > places arguments (attached to macros of course) within the menu.
> > > >
> > > > Peter, I really appreciate all your help!!,
> > > > -m
> > > >
> > > > "Peter T" wrote:
> > > >
> > > > > Why do you "get rid of the menu already in place"
> > > > >
> > > > > Is AddMenu a Sub with no arguments
> > > > >
> > > > > Do you have a similarly named AddMenu sub in any other workbook

(incl
> > > > > addins), if so did you prefix the way I suggested.
> > > > >
> > > > > Apart from your Personal.xla do you also have Personal.xls, if so

try
> > > > > renaming the addin.
> > > > >
> > > > > Regards,
> > > > > Peter T
> > > > >
> > > > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > > > news:5047FA80-1A39-40C9-98E5-(E-Mail Removed)...
> > > > > > Peter,
> > > > > >
> > > > > > When I do this, and get rid of the menu already in place (but

run
> > your
> > > > > code)
> > > > > > I get an error:
> > > > > >
> > > > > > The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found
> > > > > >
> > > > > > do you what this means?
> > > > > >
> > > > > > Thanks,
> > > > > > -m
> > > > > >
> > > > > > "Peter T" wrote:
> > > > > >
> > > > > > > Application.OnKey "+^D", "MyMacro"
> > > > > > >
> > > > > > > This should create a shortcut Shift-Ctrl-D. If there's any

> > possibility
> > > > > > > MyMacro may exist in any other workbook prefix with

> > ThisWorkbook.Name &
> > > > > "!".
> > > > > > > Call it from an Open event.
> > > > > > >
> > > > > > > Not sure about naming your addin "Personal.xla" if there may

also
> > be a
> > > > > > > Personal.xls open, guess it's OK but I wouldn't.
> > > > > > >
> > > > > > > Regards,
> > > > > > > Peter T
> > > > > > >
> > > > > > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > > > > > newsC406180-E22C-41BC-B5D9-(E-Mail Removed)...
> > > > > > > > i am using an add-in to store macro's ("personal.xla" in

> > C:\Documents
> > > > > and
> > > > > > > > Settings\mvyvoda\Application Data\Microsoft\AddIns). I need

to
> > have a
> > > > > > > > keyboard shortcut to one fuction within this add-in. The

macro
> > list
> > > > > > > (Alt-F8)
> > > > > > > > does not list any macro's in personal.xla.
> > > > > > > >
> > > > > > > > i'm not even sure where to start.
> > > > > > > >
> > > > > > > > thanks,
> > > > > > > > -m
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > > >
> > > > >

> >
> >
> >



 
Reply With Quote
 
=?Utf-8?B?bXZ5dm9kYQ==?=
Guest
Posts: n/a
 
      11th Oct 2006
Peter T,

Haha, sounds like you have a better understanding of this menu dilemma than
I do. I'm afraid I would struggle for days trying to understand the
complexity of your answer. closed events vs. open, tag properties, etc. i
have an unfortunately long-ish AddMenu module. What are the chances of you
taking a peek at it? Is that asking too much of youru time and energy?

Thanks,
Mark

"Peter T" wrote:

> > you say it's unconventional to have an entire module dedicated to adding a
> > menu (AddMenu).

>
> No I didn't mean that (an entire module etc). I meant unusual to have a
> shortcut to a procedure that in turn adds menu item(s), though I think I now
> understand what you are doing.
>
> I would suggest a different approach, and I'm assuming you are not deleting
> the menus in the close event. In the tag property of your menus write
> something that identifies your xla version, an id. In the open event try
> setting a reference to your menus (under On Error Resume Next). If the id
> refers to an old version delete it and create new menu(s). Also of course if
> the menu doesn't exist create the menu.
>
> Regards,
> Peter T
>
> "mvyvoda" <(E-Mail Removed)> wrote in message
> news:6024A9C2-67B4-434A-97C1-(E-Mail Removed)...
> > From the users standpoint, I have a series of macro's that can only run

> from
> > a menu (as opposed to going into the code and running the macro). However,
> > each iteration of my .xla file (which stores the macro's) I change this

> menu.
> >
> > So, I want to be able to automatically (via ctrl+shift+d sounds great!) to
> > change their pre-existing menu to the current one i worked on.
> >
> > you say it's unconventional to have an entire module dedicated to adding a
> > menu (AddMenu). You also say you think it wise to add a menu from within
> > another module. Is that what you're saying? I'm not sure if I follow...

> this
> > line of thinking.
> >
> > I also think i'm in way over my head :-/ But, it's pretty close....
> >
> > thanks a lot for your time and effort!!!!,
> > -m
> >
> > "Peter T" wrote:
> >
> > > I'm glad you've got it working but not sure I understand your follow-up
> > > question.
> > >
> > > You need to run the code that assigns the shortcut to your AddMenu proc,
> > > typically from an open event which might also add a menu. There's no

> need
> > > for the proc to have run once before it will work from the shortcut.
> > >
> > > It's unusual to have a shortcut that runs code to add menu items, at

> least I
> > > assume that's what AddMenu does. More conventional would be to have both

> the
> > > OnAction property of a menu item and your shortcut linked to a procedure
> > > that starts some functional aspect of your addin.
> > >
> > > Regards,
> > > Peter T
> > >
> > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > news:C83E9F19-731B-4E59-941E-(E-Mail Removed)...
> > > > oh... I misnamed AddMenu. It works now, however I have a final

> question. I
> > > > have a scenario whereby I need this ctrl+shift+D to work in a

> situation
> > > where
> > > > someone has never ran the AddMenu routine. Is this possible? Or, do I

> have
> > > to
> > > > run AddMenu with the added ctrl+shift+D code before they can use
> > > ctrl+shift+D?
> > > >
> > > > If you follow?
> > > >
> > > > Thanks,
> > > > -m
> > > >
> > > > "mvyvoda" wrote:
> > > >
> > > > > I got rid of the menu already in place to test to see if the
> > > ctrl+shift+D
> > > > > would work if only personal.xla was in place and never ran. also, i

> did
> > > > > rename the file, to no avail.
> > > > >
> > > > > I don't have any other macro's that are similarly named.
> > > > >
> > > > > AddMenu is a pretty typical routine that merely adds a menu, names

> it
> > > and
> > > > > places arguments (attached to macros of course) within the menu.
> > > > >
> > > > > Peter, I really appreciate all your help!!,
> > > > > -m
> > > > >
> > > > > "Peter T" wrote:
> > > > >
> > > > > > Why do you "get rid of the menu already in place"
> > > > > >
> > > > > > Is AddMenu a Sub with no arguments
> > > > > >
> > > > > > Do you have a similarly named AddMenu sub in any other workbook

> (incl
> > > > > > addins), if so did you prefix the way I suggested.
> > > > > >
> > > > > > Apart from your Personal.xla do you also have Personal.xls, if so

> try
> > > > > > renaming the addin.
> > > > > >
> > > > > > Regards,
> > > > > > Peter T
> > > > > >
> > > > > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > > > > news:5047FA80-1A39-40C9-98E5-(E-Mail Removed)...
> > > > > > > Peter,
> > > > > > >
> > > > > > > When I do this, and get rid of the menu already in place (but

> run
> > > your
> > > > > > code)
> > > > > > > I get an error:
> > > > > > >
> > > > > > > The macro" C:\..\AddIns\personal.xla'!AddMenu' cannot be found
> > > > > > >
> > > > > > > do you what this means?
> > > > > > >
> > > > > > > Thanks,
> > > > > > > -m
> > > > > > >
> > > > > > > "Peter T" wrote:
> > > > > > >
> > > > > > > > Application.OnKey "+^D", "MyMacro"
> > > > > > > >
> > > > > > > > This should create a shortcut Shift-Ctrl-D. If there's any
> > > possibility
> > > > > > > > MyMacro may exist in any other workbook prefix with
> > > ThisWorkbook.Name &
> > > > > > "!".
> > > > > > > > Call it from an Open event.
> > > > > > > >
> > > > > > > > Not sure about naming your addin "Personal.xla" if there may

> also
> > > be a
> > > > > > > > Personal.xls open, guess it's OK but I wouldn't.
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Peter T
> > > > > > > >
> > > > > > > > "mvyvoda" <(E-Mail Removed)> wrote in message
> > > > > > > > newsC406180-E22C-41BC-B5D9-(E-Mail Removed)...
> > > > > > > > > i am using an add-in to store macro's ("personal.xla" in
> > > C:\Documents
> > > > > > and
> > > > > > > > > Settings\mvyvoda\Application Data\Microsoft\AddIns). I need

> to
> > > have a
> > > > > > > > > keyboard shortcut to one fuction within this add-in. The

> macro
> > > list
> > > > > > > > (Alt-F8)
> > > > > > > > > does not list any macro's in personal.xla.
> > > > > > > > >
> > > > > > > > > i'm not even sure where to start.
> > > > > > > > >
> > > > > > > > > thanks,
> > > > > > > > > -m
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot type shortcut keys into keyboard shortcut dialogue box Vickif Microsoft Word Document Management 1 16th Apr 2010 04:19 AM
shortcut to keyboard shortcut Johan Windows XP General 3 16th Jul 2006 10:56 PM
Keyboard Shortcut =?Utf-8?B?YjExXw==?= Windows XP General 1 23rd Dec 2005 01:42 AM
Keyboard Shortcut =?Utf-8?B?SXNsYW5kIEdpcmw=?= Microsoft Word New Users 5 13th Dec 2005 07:42 AM
keyboard shortcut aaron Windows XP Internet Explorer 1 29th Nov 2003 06:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:53 PM.