Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello Minh, Change *Dim myLine As Long* to *Dim myLine*. You are getting an error because you are trying to assign a non nimeric value to a Long Integer. Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=491149 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Event handler in a cell | Excel Programming | |||
Global event handler?? | Excel Programming | |||
where is the workbook_open event handler??? | Excel Programming | |||
different IDispatch in event handler | Excel Programming | |||
Cell Event Handler | Excel Programming |