On Fri, 13 Jun 2008 08:14:05 -0700, Steven
<(E-Mail Removed)> wrote:
You're welcome.
>My error:
>on the .OnAction you can call a macro from another file just as if you did
>it manually. The only difference is that you do not see the macro under the
>"Assign Macro". WOW ... That just made my Friday !!!!!!
>
>"Steven" wrote:
>
>> But it does not show up under the "Assign Macro" of the menu item. I want to
>> set it up to point to a macro in a different file just as if I had manually
>> gone to View / Toolbars / Customize and right clicked on the created Menu
>> Item and gone to "Assign Macro". I can attach a Macro from any file there
>> but I dont see how you do that from code.
>>
>> "Stephen Newman" wrote:
>>
>> > This works for me.
>> >
>> > With Application.CommandBars("Cell").Controls.Add(Temporary:=True)
>> > .Caption = "Your Caption" 'Name the button
>> > .OnAction = "YourModule.YourCode" 'Point to the code you want
>> > to run
>> > .FaceId = 1089 'Adds an icon
>> > End With
>> >
>> >
>> >
>> > On Thu, 12 Jun 2008 16:53:00 -0700, Steven
>> > <(E-Mail Removed)> wrote:
>> >
>> > >I have seen .OnAction such as:
>> > >Item2Sub2.OnAction = "ShowMessage"
>> > >
>> > >but
>> > >
>> > >How do I "Assign Macro" to a Menu Item in code?
>> > >
>> > >Thank you,
>> > >
>> > >Steven
>> >
|