Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CommandButton Question
I inserted a CommandButton into a worksheet. I'm trying to have the
CommandButton run another macro that I have in a different module (Module 4). The code that I've used is Private Sub CommandButton1_Click() Call Module4.MACRO1 End Sub However, instead of executing the macro, it displays the VBE window for CommandButton1 (and shows the above code). How can I have the CommandButton run the macro instead of displaying the VBE? Thanks in advance for your help! Magnivy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
CommandButton Question
You're making it too dificult. Try this:
Call Macro1 HTH Die_Another_Day Magnivy wrote: I inserted a CommandButton into a worksheet. I'm trying to have the CommandButton run another macro that I have in a different module (Module 4). The code that I've used is Private Sub CommandButton1_Click() Call Module4.MACRO1 End Sub However, instead of executing the macro, it displays the VBE window for CommandButton1 (and shows the above code). How can I have the CommandButton run the macro instead of displaying the VBE? Thanks in advance for your help! Magnivy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
CommandButton Question
I tried another time and it worked. Please disregard the question below.
Magnivy "Magnivy" wrote: I inserted a CommandButton into a worksheet. I'm trying to have the CommandButton run another macro that I have in a different module (Module 4). The code that I've used is Private Sub CommandButton1_Click() Call Module4.MACRO1 End Sub However, instead of executing the macro, it displays the VBE window for CommandButton1 (and shows the above code). How can I have the CommandButton run the macro instead of displaying the VBE? Thanks in advance for your help! Magnivy |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
CommandButton Question
Sounds like you're still in design mode and you're double clicking - is that
possible? Jeff "Magnivy" wrote in message ... I inserted a CommandButton into a worksheet. I'm trying to have the CommandButton run another macro that I have in a different module (Module 4). The code that I've used is Private Sub CommandButton1_Click() Call Module4.MACRO1 End Sub However, instead of executing the macro, it displays the VBE window for CommandButton1 (and shows the above code). How can I have the CommandButton run the macro instead of displaying the VBE? Thanks in advance for your help! Magnivy |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
CommandButton Question
Make sure you are not in design mode. To check, goto View, Toolbars, Control Toolbox, is the Design Mode ico highlighted? When you mouse over the Commandbutton, do you see an arrow (norma mode)? or an arrow with direction arrows around it (design mode) -- Bearacad ----------------------------------------------------------------------- Bearacade's Profile: http://www.excelforum.com/member.php...fo&userid=3501 View this thread: http://www.excelforum.com/showthread.php?threadid=54997 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
CommandButton Question
Yep, I was in design mode. Thanks a lot for your help Bearacade!
"Bearacade" wrote: Make sure you are not in design mode. To check, goto View, Toolbars, Control Toolbox, is the Design Mode icon highlighted? When you mouse over the Commandbutton, do you see an arrow (normal mode)? or an arrow with direction arrows around it (design mode)? -- Bearacade ------------------------------------------------------------------------ Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016 View this thread: http://www.excelforum.com/showthread...hreadid=549979 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Commandbutton | Excel Programming | |||
Simpel commandbutton question | Excel Programming | |||
Simple Question: Hiding a CommandButton | Excel Programming | |||
CommandButton | Excel Programming | |||
Commandbutton | Excel Programming |