View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
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