Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 -- Assign a macro to a button | Excel Discussion (Misc queries) | |||
how do I assign a macro to a tool in Excel 2007 | Excel Discussion (Misc queries) | |||
how to create a command button, then assign macro to it in excel | Excel Discussion (Misc queries) | |||
how do you assign a macro to a command button in Excel 2003 | Excel Discussion (Misc queries) | |||
Assign macro to button in EXCEL 2003 | Excel Programming |