View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Put CommandButton1 code in Module1

No, the event procedure code must reside in the code module of the object.
You can certainly put "ListUpdates" in Module1, but the actual click event
code must reside in the Sheet module of the sheet that contains the control.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"DocBrown" wrote in message
...
Is there a way to have the command button execution code in Module1
instead
of in the worksheet. Currently the CommandButton1 code is:

Private Sub CommandButton1_Click()
ListsUpdate
End Sub

Where ListsUpdate is a macro in Module1.