LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Event handler is invalid

Hello! Any ideas why I am getting this error?

I did add the Extensibility reference, and set Trust access to Visual Basic
Project. I also started over in a new workbook to make sure any previous
error did not corrupt anything.

Dim myLabel As MSForms.Label
Set myLabel = myForm.Controls.Add("Forms.Label.1", "Label1")

Dim myLine As Long

With ActiveWorkbook.VBProject.VBComponents("myForm").Co deModule
myLine = .CreateEventProc("Click", myLabel.Name) + 1
.InsertLines myLine, "MsgBox ""Hello!"""
End With

 
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
Event handler in a cell Man Utd Excel Programming 3 June 15th 05 07:44 AM
Global event handler?? [email protected] Excel Programming 1 October 23rd 04 05:31 PM
where is the workbook_open event handler??? Steff_DK[_10_] Excel Programming 2 April 25th 04 02:43 PM
different IDispatch in event handler Dirk[_2_] Excel Programming 0 January 23rd 04 11:04 PM
Cell Event Handler David Excel Programming 3 January 19th 04 04:51 PM


All times are GMT +1. The time now is 10:02 AM.

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"