Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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
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
Commandbutton alvin Kuiper Excel Programming 6 November 27th 05 06:28 PM
Simpel commandbutton question Andy T via OfficeKB.com Excel Programming 3 September 8th 05 06:39 PM
Simple Question: Hiding a CommandButton JasperBlaas Excel Programming 3 August 9th 04 01:28 PM
CommandButton chris[_12_] Excel Programming 1 April 15th 04 01:01 AM
Commandbutton David Fixemer Excel Programming 2 February 25th 04 10:18 PM


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