Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default click in a workbook

Hello,
I would like to create controls on different sheet.
But have the event code in the main workbook. And have none in the
worksheets.
Is this possible?
Where I could have a
Workbook_<SOMETHING event.
Then have a case statment looking for the control name.
If it was CommandButton1 on sheet1 I would look for CommandButton1.
If it was CheckBox1 on sheet5, I would look for CheckBox1.
is this possible?
thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default click in a workbook

I thought I could use the WithEvents
so in my workbook have
Private WithEvents CmdBut As CommandButton
then
Private Sub CmdBut_Click()
MsgBox "in thisworkbook"
End Sub

but this does not work

Any help?
thanks


"greg" wrote in message
...
Hello,
I would like to create controls on different sheet.
But have the event code in the main workbook. And have none in the
worksheets.
Is this possible?
Where I could have a
Workbook_<SOMETHING event.
Then have a case statment looking for the control name.
If it was CommandButton1 on sheet1 I would look for CommandButton1.
If it was CheckBox1 on sheet5, I would look for CheckBox1.
is this possible?
thanks



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
Can I toggle between sheets in a workbook without having to click? soconfused Excel Discussion (Misc queries) 6 December 2nd 09 10:59 PM
Click on cell to open another workbook dsimpson Excel Discussion (Misc queries) 1 September 17th 08 05:01 PM
can't click on cell to reference to another workbook reallytryingtogetworkdone Excel Worksheet Functions 1 January 7th 08 09:44 PM
Double Click will not open my Workbook Stacy Excel Discussion (Misc queries) 3 April 13th 06 07:06 PM
Overwriting an existing workbook without having to click yes in the prompt box Ian M[_2_] Excel Programming 2 May 3rd 04 03:41 AM


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