Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Darby
 
Posts: n/a
Default assigning a macro to a button

I have a macro that runs fine and I added a button to my spreadsheet from
the forms control menu, but I can't figure out how to assign the macro to the
button.

I was expecting to see and "assign macro" option available when I right
click on the button, however it's not there.

Any ideas?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
flummi
 
Posts: n/a
Default assigning a macro to a button

Click the green triangle on the Controlbox Toolbar (design mode)
Right click your button.
From the context menu select View Code

between the lines
Private sub
and End sub

type the name of your macro.

Turn off design mode and test it.

Hans

  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default assigning a macro to a button

You added a commandbutton from the control toolbox. You can either follow
flummi's advice or delete that commandbutton and add a button from the Forms
toolbar.

Darby wrote:

I have a macro that runs fine and I added a button to my spreadsheet from
the forms control menu, but I can't figure out how to assign the macro to the
button.

I was expecting to see and "assign macro" option available when I right
click on the button, however it's not there.

Any ideas?

Thanks


--

Dave Peterson
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
how to create a command button, then assign macro to it in excel kshaheen Excel Discussion (Misc queries) 3 June 24th 08 01:03 PM
Macro Button Maggie Excel Discussion (Misc queries) 3 June 28th 05 04:29 AM
Attaching a macro to a VB button on a form WildGlio Excel Worksheet Functions 2 March 25th 05 11:11 PM
Assigning a macro to a "button" Yvon Excel Discussion (Misc queries) 6 February 8th 05 10:58 PM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 06:11 PM


All times are GMT +1. The time now is 12:27 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"