Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Assigning Macros

I have recorded a Macro and created a command button but I
can not figure how to assign the macro top the command
button. I have follow MS instructions as far as right
clicking the sizing corners for the short cut menu but I
do not get the option on the shortcut menu to assign
Macro. I must not have something set right and MS assumes
to much in their directions

Thanks for any help.

Tom
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Assigning Macros

There are buttons from the Forms toolbar and the control toolbox toolbar.

The one from the Forms toolbar behaves the way you want. I bet you used the one
from the Controltoolbox toolbar.

So just delete that one and add one from the Forms toolbar.
(Then you'll be able to rightclick and assign your macro.)

T F Hewitt wrote:

I have recorded a Macro and created a command button but I
can not figure how to assign the macro top the command
button. I have follow MS instructions as far as right
clicking the sizing corners for the short cut menu but I
do not get the option on the shortcut menu to assign
Macro. I must not have something set right and MS assumes
to much in their directions

Thanks for any help.

Tom



T F Hewitt wrote:

I have recorded a Macro and created a command button but I
can not figure how to assign the macro top the command
button. I have follow MS instructions as far as right
clicking the sizing corners for the short cut menu but I
do not get the option on the shortcut menu to assign
Macro. I must not have something set right and MS assumes
to much in their directions

Thanks for any help.

Tom


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Assigning Macros

Okay, I have noticed this too in the past, though I forget exactly what it
was that caused the issue as it was in XL97. However, there is a way to get
around this. Follow the steps below:

If you don't have the Visual Basic toolbar up, bring it up.
To bring this up, right click in the toolbar area of the application,
then select "Visual Basic".

Have the Design button pressed in by clicking on it.

Right Click on your command button and then click on "View Code"
This will take you into the Visual Basic Editor with the Command button
shown in the upper left box.

In the upper right box, select the "Click" Event, if it's not already
selected.
This will automatically create a Private Sub command for the command
button's Click event.

In between the "Private Sub" and "End Sub" lines, put in the name of the
macro that you want assigned to the command button, provided it's within the
same workbook as the command button, otherwise, you will need to put in the
macro name in the following syntax:

<WorkbookName!<ModuleName.<MacroName

Note: <WorkbookName is the name of the workbook which is case sensitive
and must include the 3 letter extension. <ModuleName is the name of the
Module/Object that the macro is part of

Examples:

Book1.xls!Worksheets("Sheet1").MyMacro
Book1.xls!Module1.MyMacro2

--
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"T F Hewitt" wrote in message
...
I have recorded a Macro and created a command button but I
can not figure how to assign the macro top the command
button. I have follow MS instructions as far as right
clicking the sizing corners for the short cut menu but I
do not get the option on the shortcut menu to assign
Macro. I must not have something set right and MS assumes
to much in their directions

Thanks for any help.

Tom



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Assigning Macros

You beat me to it, but what I have done, I went into the View Code, then put
in the name of the macro within the Click Event procedure, as I ran into
this problem in the past under XL97, but thankfully for me, I was already
acquanted with VBA, when I ran into this issue.

--
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"Dave Peterson" wrote in message
...
There are buttons from the Forms toolbar and the control toolbox toolbar.

The one from the Forms toolbar behaves the way you want. I bet you used

the one
from the Controltoolbox toolbar.

So just delete that one and add one from the Forms toolbar.
(Then you'll be able to rightclick and assign your macro.)

T F Hewitt wrote:

I have recorded a Macro and created a command button but I
can not figure how to assign the macro top the command
button. I have follow MS instructions as far as right
clicking the sizing corners for the short cut menu but I
do not get the option on the shortcut menu to assign
Macro. I must not have something set right and MS assumes
to much in their directions

Thanks for any help.

Tom



T F Hewitt wrote:

I have recorded a Macro and created a command button but I
can not figure how to assign the macro top the command
button. I have follow MS instructions as far as right
clicking the sizing corners for the short cut menu but I
do not get the option on the shortcut menu to assign
Macro. I must not have something set right and MS assumes
to much in their directions

Thanks for any help.

Tom


--

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
Assigning Macros Randy Excel Worksheet Functions 4 November 15th 07 08:56 PM
Assigning Macros to Run from a Cell Brendan Vassallo Excel Discussion (Misc queries) 1 February 12th 07 06:08 AM
Assigning macros Mandy Excel Discussion (Misc queries) 4 February 7th 07 08:43 AM
assigning macros enyaw Excel Discussion (Misc queries) 1 September 6th 06 04:39 PM
Assigning Macros to Buttons Christine Excel Discussion (Misc queries) 1 May 11th 06 09:42 PM


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