PC Review


Reply
Thread Tools Rate Thread

assign action to custom button

 
 
tracktraining
Guest
Posts: n/a
 
      25th Feb 2009
Hi All,

I have created a button via customize -> toolbars-> new -> added command
button (rename from &button to &Report)

I would like to know how to refer to this button in vba coding? I would like
to code: when the button report is click, then load the userform Report_Graph.


Private Sub Report_Click()
Report_Graphs.Show vbModeless
End Sub

i think this code would be in the ThisWorkBook object.

Private sub
or is there a better way to do this?

thanks for the help.

still learning,
tracktraining
--
Learning
 
Reply With Quote
 
 
 
 
FSt1
Guest
Posts: n/a
 
      25th Feb 2009
hi
i think that maybe all you need to do is assign your macro to the custom
button.
to do so...
right click any toolbar. with the customize dialog up, right click your
buttom then from the popup select assign macro. from the assign macro dialog,
scroll to and select your macro. ok on the assign macro dialog >close on the
customize dialog.

should be done.
Regards
FSt1


"tracktraining" wrote:

> Hi All,
>
> I have created a button via customize -> toolbars-> new -> added command
> button (rename from &button to &Report)
>
> I would like to know how to refer to this button in vba coding? I would like
> to code: when the button report is click, then load the userform Report_Graph.
>
>
> Private Sub Report_Click()
> Report_Graphs.Show vbModeless
> End Sub
>
> i think this code would be in the ThisWorkBook object.
>
> Private sub
> or is there a better way to do this?
>
> thanks for the help.
>
> still learning,
> tracktraining
> --
> Learning

 
Reply With Quote
 
tracktraining
Guest
Posts: n/a
 
      25th Feb 2009
thanks!
--
Learning


"FSt1" wrote:

> hi
> i think that maybe all you need to do is assign your macro to the custom
> button.
> to do so...
> right click any toolbar. with the customize dialog up, right click your
> buttom then from the popup select assign macro. from the assign macro dialog,
> scroll to and select your macro. ok on the assign macro dialog >close on the
> customize dialog.
>
> should be done.
> Regards
> FSt1
>
>
> "tracktraining" wrote:
>
> > Hi All,
> >
> > I have created a button via customize -> toolbars-> new -> added command
> > button (rename from &button to &Report)
> >
> > I would like to know how to refer to this button in vba coding? I would like
> > to code: when the button report is click, then load the userform Report_Graph.
> >
> >
> > Private Sub Report_Click()
> > Report_Graphs.Show vbModeless
> > End Sub
> >
> > i think this code would be in the ThisWorkBook object.
> >
> > Private sub
> > or is there a better way to do this?
> >
> > thanks for the help.
> >
> > still learning,
> > tracktraining
> > --
> > Learning

 
Reply With Quote
 
FSt1
Guest
Posts: n/a
 
      25th Feb 2009
you're welcome
regards
FSt1

"tracktraining" wrote:

> thanks!
> --
> Learning
>
>
> "FSt1" wrote:
>
> > hi
> > i think that maybe all you need to do is assign your macro to the custom
> > button.
> > to do so...
> > right click any toolbar. with the customize dialog up, right click your
> > buttom then from the popup select assign macro. from the assign macro dialog,
> > scroll to and select your macro. ok on the assign macro dialog >close on the
> > customize dialog.
> >
> > should be done.
> > Regards
> > FSt1
> >
> >
> > "tracktraining" wrote:
> >
> > > Hi All,
> > >
> > > I have created a button via customize -> toolbars-> new -> added command
> > > button (rename from &button to &Report)
> > >
> > > I would like to know how to refer to this button in vba coding? I would like
> > > to code: when the button report is click, then load the userform Report_Graph.
> > >
> > >
> > > Private Sub Report_Click()
> > > Report_Graphs.Show vbModeless
> > > End Sub
> > >
> > > i think this code would be in the ThisWorkBook object.
> > >
> > > Private sub
> > > or is there a better way to do this?
> > >
> > > thanks for the help.
> > >
> > > still learning,
> > > tracktraining
> > > --
> > > Learning

 
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
assign macro to action button =?Utf-8?B?RGVlbm9fQ08=?= Microsoft Powerpoint 1 12th Oct 2006 02:51 PM
Cannot successfully assign a macro to an action button =?Utf-8?B?ZGVlbm9faW5fQ08=?= Microsoft Powerpoint 1 12th Oct 2006 12:48 AM
assign macro to action button =?Utf-8?B?RGVlbm9fQ08=?= Microsoft Powerpoint 0 11th Oct 2006 11:18 PM
Can I assign a keyboard shortcut to a hyperlink or action button simmo Microsoft Powerpoint 0 24th Jul 2005 10:38 PM
how do I assign an Object Action to an Action Button? =?Utf-8?B?S0FsbHBvcnQ=?= Microsoft Powerpoint 1 17th Apr 2005 11:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:17 PM.