Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
PFB PFB is offline
external usenet poster
 
Posts: 12
Default Place a button on a worksheet and assign a macro to it?

How do I place a single "button" on a worksheet (say, in one cell), and
assign a macro to it?
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,346
Default Place a button on a worksheet and assign a macro to it?

Hi,

Choose View, Toolbars, and pick the Forms toolbar. Click the Button tool
and then click in the spreadsheet. You will be prompted for the macro you
want to assign. You can resize and move the button after assigning the macro.

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"PFB" wrote:

How do I place a single "button" on a worksheet (say, in one cell), and
assign a macro to it?

  #4   Report Post  
Posted to microsoft.public.excel.newusers
PFB PFB is offline
external usenet poster
 
Posts: 12
Default Place a button on a worksheet and assign a macro to it?

Hi,
Sounds simple, but I am using Excel2007 (Vista) and I can't find "Toolbars"
or "Forms" on the ribbon under View, and the help function has not "helped".
What am I missing?

Thanks, Paul

"Shane Devenshire" wrote:

Hi,

Choose View, Toolbars, and pick the Forms toolbar. Click the Button tool
and then click in the spreadsheet. You will be prompted for the macro you
want to assign. You can resize and move the button after assigning the macro.

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"PFB" wrote:

How do I place a single "button" on a worksheet (say, in one cell), and
assign a macro to it?

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default Place a button on a worksheet and assign a macro to it?

You have to show the Developer tab

I _think_ it's under
Office button|excel options|Popular

Then click on the Developer tab|Controls Group|Insert icon

You'll be able to choose between a button from the Forms toolbar (on top) or a
commandbutton from the control toolbox toolbar (on the bottom).

You want the top one.

PFB wrote:

Hi,
Sounds simple, but I am using Excel2007 (Vista) and I can't find "Toolbars"
or "Forms" on the ribbon under View, and the help function has not "helped".
What am I missing?

Thanks, Paul

"Shane Devenshire" wrote:

Hi,

Choose View, Toolbars, and pick the Forms toolbar. Click the Button tool
and then click in the spreadsheet. You will be prompted for the macro you
want to assign. You can resize and move the button after assigning the macro.

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"PFB" wrote:

How do I place a single "button" on a worksheet (say, in one cell), and
assign a macro to it?


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default Place a button on a worksheet and assign a macro to it?

On Dec 1, 3:10*am, Shane Devenshire
wrote:
Hi,

Choose View, Toolbars, and pick the Forms toolbar. *Click the Button tool
and then click in the spreadsheet. *You will be prompted for the macro you
want to assign. *You can resize andmovethe button after assigning the macro.

If this helps, please click the Yes button

Cheers,
Shane Devenshire



"PFB" wrote:
How do I place a single "button" on aworksheet(say, in one cell), and
assign a macro to it?- Hide quoted text -


- Show quoted text -


How do I move the button and macro? When I move the button, the macro
stays in place it was created. I would like to add rows to my
worksheet, but when I do all of my macros are askew.

Thanks,
Kasandra
  #7   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default Place a button on a worksheet and assign a macro to it?

The macro stays assigned to the button no matter where you move it.

If your macro relies on the position of the button, you could check in your
code.

For instance:

Option Explicit
sub testme()
dim BTN as button 'from the Forms toolbar!
set btn = activesheet.buttons(application.caller)
msgbox btn.topleftcell.address 'just to show you.

'select the row that contains the topleftcell of the button
btn.topleftcell.entirerow.select
end sub


wrote:

<<snipped

How do I move the button and macro? When I move the button, the macro
stays in place it was created. I would like to add rows to my
worksheet, but when I do all of my macros are askew.

Thanks,
Kasandra


--

Dave Peterson
  #8   Report Post  
Junior Member
 
Location: Ireland
Posts: 29
Default

Quote:
Originally Posted by PFB View Post
How do I place a single "button" on a worksheet (say, in one cell), and
assign a macro to it?
Create you macro first. Now make sure you have the "Drawing" toolbar visible (View/Toolbars/Drawing). Next create the button on the spreadsheet using either the "Rectangle" or "Oval" option on the Drawing toolbar. Then right-click on the button and click on "assign Macro". Select the macro you want to execute when the button is pressed. You can put text on the button or colour it, if you like.


regards

mjd
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
Assign a macro to a button totofab Excel Discussion (Misc queries) 4 December 13th 07 06:16 PM
Assign a macro to a command button SheriTingle Excel Discussion (Misc queries) 4 September 25th 06 06:38 PM
How do I Assign Macro to a button? BellExcel Charts and Charting in Excel 4 May 20th 05 07:21 PM
How to assign a macro to a commnd button Mickey Blue Eyes Excel Discussion (Misc queries) 2 January 4th 05 02:15 PM
assign a macro to a control button ewan72 Excel Discussion (Misc queries) 1 December 3rd 04 02:04 PM


All times are GMT +1. The time now is 02:13 PM.

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"