Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Assigning Macro to a Command Button

I created a macro that will hide a chunk of data so that I can copy and paste
select information to send to someone.
I added a radio button or command button.

If I create a check box, I can right click and say "assign macro". When I
try to assign a command button I do not have the same option.

I tried going into the view code but I haven't got a clue what to do when
I'm there.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 284
Default Assigning Macro to a Command Button

melaniem

Please try to be a little more clear as to what you are trying to do. I got
that you have the macro, and it sounds like you are trying to run it via a
button or something. Post back and tell us what you are trying to accomplish.

Mike Rogers

"melaniem" wrote:

I created a macro that will hide a chunk of data so that I can copy and paste
select information to send to someone.
I added a radio button or command button.

If I create a check box, I can right click and say "assign macro". When I
try to assign a command button I do not have the same option.

I tried going into the view code but I haven't got a clue what to do when
I'm there.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Assigning Macro to a Command Button

Melanie,

If you right click on the radio button do you see "Assign macro" grayed out
or is it not there at all?

If it's not there at all, in design mode you can double click on the control
and you'll bring up the command window, with something like:
Private Sub commandbutton1_click()

End Sub

This means you're using an activex controll. If you want to, you can paste
your macro in there between the Sub lines.

If the "Assign macro" does appear in gray, it's an Excel "feature". Try
clicking somewhere else on the sheet and then retrying (more than once if
necessary). It will appear activated eventually.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Assigning Macro to a Command Button

Create the button using the Forms Toolbar and not the Control ToolBox

Then you will get the Assign Macro option.


Gord Dibben MS Excel MVP

On Thu, 10 Jan 2008 19:59:21 -0800, melaniem
wrote:

I created a macro that will hide a chunk of data so that I can copy and paste
select information to send to someone.
I added a radio button or command button.

If I create a check box, I can right click and say "assign macro". When I
try to assign a command button I do not have the same option.

I tried going into the view code but I haven't got a clue what to do when
I'm there.


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
Assigning a command button to a macro Rich D Excel Discussion (Misc queries) 6 October 30th 07 06:01 PM
Assigning a macro to a command button SheriTingle Excel Discussion (Misc queries) 1 September 25th 06 06:34 PM
Help in assigning a command button Fybo Excel Discussion (Misc queries) 1 September 19th 05 07:36 PM
assigning macro to button BorisS Excel Discussion (Misc queries) 2 September 12th 05 05:08 AM
Assigning a macro to a "button" Yvon Excel Discussion (Misc queries) 6 February 8th 05 10:58 PM


All times are GMT +1. The time now is 08:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"