Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / May 2008

Tip: Looking for answers? Try searching our database.

create a button in spreadsheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ann - 29 May 2008 22:22 GMT
i have just built a macro.  how do i create a button in the spreadsheet to
run the macro?  for instance, press button and the macro will run, putting in
the answer in the field next to the button?
jatman - 29 May 2008 22:38 GMT
in Office 2007, use the Developer Tab, insert either a form control or active
x control, and assign the macro to it.

it's been a while since i have had to do it in Office 2003, so i cannot help
in that.

jat

> i have just built a macro.  how do i create a button in the spreadsheet to
> run the macro?  for instance, press button and the macro will run, putting in
> the answer in the field next to the button?
FSt1 - 29 May 2008 22:51 GMT
hi
if 2003 then
on the menu bar....
view>toolbars>control toolbox. (you can use the forms button but i recommend
the control toolbox button.)
mouse over the controls untill you find command button. click it then click
the sheet and drag to size the button on the sheet.
right click the button and click view code.
Private Sub CommandButton1_Click()
call yourmacroname
End Sub
close the vb editor
right click the button again. click properties.
here you can set button caption, background color, font color and other
properties.
when done close the property box.
mouse over the control toolbar again and click exit design mode. close the
toolbar.

Button should be live and ready to go.

regards
FSt1

> i have just built a macro.  how do i create a button in the spreadsheet to
> run the macro?  for instance, press button and the macro will run, putting in
> the answer in the field next to the button?
Ann - 29 May 2008 23:02 GMT
here's the vb editor:

Private Sub ReportCompleted_Click()
Call Macro3
End Sub

when i click the button, it does nothing, i get the 4 arrow when i hover
over it.  help.

> hi
> if 2003 then
[quoted text clipped - 23 lines]
> > run the macro?  for instance, press button and the macro will run, putting in
> > the answer in the field next to the button?
Ann - 29 May 2008 23:05 GMT
got it, it works.

> here's the vb editor:
>
[quoted text clipped - 32 lines]
> > > run the macro?  for instance, press button and the macro will run, putting in
> > > the answer in the field next to the button?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.