Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calling an embedded items event procedure from within a normal module
Trying to call the event procedure "Private Sub TxtString_GotFocus()"
from with a normal module in the same workbook. The event procedure is for a textbox that is embedded in Sheet4 so the event procedure is within the class module connected to Sheet4 Must be quite easy, but keeps throwing an error for me Help greatly appreciated Jason |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calling an embedded items event procedure from within a normal module
The following code works for me just fine in Excel 2003.
Private Sub TextBox1_GotFocus() MsgBox "GotFocus" End Sub What specific error are you seeing? -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "jase" wrote in message oups.com... Trying to call the event procedure "Private Sub TxtString_GotFocus()" from with a normal module in the same workbook. The event procedure is for a textbox that is embedded in Sheet4 so the event procedure is within the class module connected to Sheet4 Must be quite easy, but keeps throwing an error for me Help greatly appreciated Jason |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calling an embedded items event procedure from within a normal module
You need to declare it as public and then use
Sheet4!TxtString_GotFocus to call it from the normal module. -- Regards, Tom Ogilvy "jase" wrote in message oups.com... Trying to call the event procedure "Private Sub TxtString_GotFocus()" from with a normal module in the same workbook. The event procedure is for a textbox that is embedded in Sheet4 so the event procedure is within the class module connected to Sheet4 Must be quite easy, but keeps throwing an error for me Help greatly appreciated Jason |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calling an embedded items event procedure from within a normal module
just to be pedantic Tom (as I'm sure it was just a little typo) but the
code that worked was: Sheet4.TxtString_GotFocus Thanks again Jason Tom Ogilvy wrote: You need to declare it as public and then use Sheet4!TxtString_GotFocus to call it from the normal module. -- Regards, Tom Ogilvy "jase" wrote in message oups.com... Trying to call the event procedure "Private Sub TxtString_GotFocus()" from with a normal module in the same workbook. The event procedure is for a textbox that is embedded in Sheet4 so the event procedure is within the class module connected to Sheet4 Must be quite easy, but keeps throwing an error for me Help greatly appreciated Jason |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calling procedure from another WKB with parameters | Excel Programming | |||
Calling a procedure in a procedure | Excel Programming | |||
Calling a procedure in a procedure | Excel Programming | |||
Calling a procedure in a procedure | Excel Programming | |||
OnTime event not firing in Workbook_Open event procedure | Excel Programming |