Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I cannot use Assign macro in Excel. Could before but not now. A.

Is there a VB command method to execute a macro if the
Assign Macro doesn't show. Or is there something
changed I need to fix.
TIA
Dan Cring
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default I cannot use Assign macro in Excel. Could before but not now. A.

Hi Dan

Assign to what ? Just a guess; you're using a commandbutton from the
controls toolbox. They have their own macros. Choose "view code" (also
rightclick) and call your macro from that one, like

Private Sub CommandButton1_Click()
Call FantasticMacro
End Sub

HTH. Best wishes Harald

"OWU Programming" <OWU skrev i
melding ...
Is there a VB command method to execute a macro if the
Assign Macro doesn't show. Or is there something
changed I need to fix.
TIA
Dan Cring



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default I cannot use Assign macro in Excel. Could before but not now. A.

Dan-

Excel has two different toolbars, theForms toolbar and the Control Toolbox
toolbar, that contain Button controls which makes things confusing. If you
used the "Command Button" from the Control Toolbox toolbar you will not be
able to assign a marco. The "Command Button" from the Control Toolbox
toolbar uses the CommandButton_Click event to lauch macros.

Make sure you use the "Button" control from the Forms toolbar and you will
be able to right click to assign the macro.

-Stan Shoemaker
Palo Alto, CA


"OWU Programming" wrote:

Is there a VB command method to execute a macro if the
Assign Macro doesn't show. Or is there something
changed I need to fix.
TIA
Dan Cring

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default I cannot use Assign macro in Excel. Could before but not now. A.

Hi

You use a button from the control toolbox and not from the Forms toolbar

Press the first button on the control toolbox toolbar to go into the design
mode
Double click on the button you placed on your worksheet.
The VBA editor will open with this

Private Sub CommandButton1_Click()

End Sub

You can place the code in the event or place the macro name in the event.
Press Alt-q to go back to Excel and press the first button on the
control toolbox again to exit the design mode


--
Regards Ron de Bruin
http://www.rondebruin.nl


"OWU Programming" <OWU wrote in message
...
Is there a VB command method to execute a macro if the
Assign Macro doesn't show. Or is there something
changed I need to fix.
TIA
Dan Cring



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default I cannot use Assign macro in Excel. Could before but not now. A.

Sounds like you are using controls from the Control Toolbox Toolbar and
think you are using controls from the Forms Toolbar. Use the controls from
the Forms toolbar and you will be able to assign a macro. Controls from
the control toolbox Toolbar use events.
The articles will give some insight in to using Control Toolbox Toolbar
events: (they are for userforms, but using them on worksheets is similar).

http://support.microsoft.com/?id=168067
XL97: WE1163: "Visual Basic Examples for Controlling UserForms"

Microsoft(R) Visual Basic(R) for Applications Examples for Controlling
UserForms in Microsoft Excel 97

This Application Note is an introduction to manipulating UserForms in
Microsoft Excel 97. It includes examples and Microsoft Visual Basic for
Applications macros that show you how to take advantage of the capabilities
of UserForms and use each of the ActiveX controls that are available for
UserForms

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

Here is an article about using Control Toolbox Toolbar controls on a
worksheet:
http://www.microsoft.com/ExcelDev/Articles/activexl.htm
Using ActiveX Controls on a Microsoft Excel Worksheet

--
Regards,
Tom Ogilvy





--
Regards,
Tom Ogilvy

"OWU Programming" <OWU wrote in
message ...
Is there a VB command method to execute a macro if the
Assign Macro doesn't show. Or is there something
changed I need to fix.
TIA
Dan Cring



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
Excel 2007 -- Assign a macro to a button Steve Excel Discussion (Misc queries) 1 October 27th 09 03:45 PM
how do I assign a macro to a tool in Excel 2007 Sarah Juenemann Excel Discussion (Misc queries) 1 October 10th 08 12:17 PM
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
how do you assign a macro to a command button in Excel 2003 ns Excel Discussion (Misc queries) 5 October 25th 07 08:58 PM
Assign macro to button in EXCEL 2003 Steffen Kuenstner Excel Programming 1 January 8th 04 11:04 AM


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