Message 1 of 1
Runtime error 424... object required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am having issues with this menu pick:
[code]
(vl-vbaload (strcat e_pdr "/Control_Numbering/InsertPc-Mark.dvb"))(vl-vbarun "Main")
[/code]
This is weird… I know, (and I’ve checked this multiple times) but … what seems to be happening is the InsertPc-Mark.dvb is for some reason getting loaded twice (when the error pops, I can see two identical entries in the VBA Manager). The User Form (dialog) from the second one is running … but the vlisp code is attempting to close the user form from the first, and since it’s user form isn’t being displayed I get the object required error 424 …. (weird!) When I click ‘Debug’… VBIDE highlights the line in yellow… if I click quit... then that instance quits… but the dialog (actually from the other instance) remains on the screen… I have to quit out of both instances to close out of the errror condition.
When I run the vba from VBIDE... it runs fine, but when I run it via this menu pick I get the error when I close the application.
The intent… to close the app I use one of two methods… one for when the lisp is done from the visual lisp code:
(if startedfromVBA (vl-vbarun "G:\\R2007\\Control_Numbering\\InsertPc-Mark.dvb!basMain.cmdExitVBA"))
Alternatively, a user click on the VBA form closes the VBA app (and the Vlisp code) also… via this function:
[code]
Private Sub cmdExit_Click()
Unload Me ' close the dialog box
SendKeys "{ESC}" ' send an escape key, closes lisp app
End Sub
[/code]
When ran from the menu pick or from AutoCAD’s command prompt, I get the same error and then find two identical entries in VBA Manager. Is vla-
[code]
(vl-vbaload (strcat e_pdr "/Control_Numbering/InsertPc-Mark.dvb"))(vl-vbarun "Main")
[/code]
This is weird… I know, (and I’ve checked this multiple times) but … what seems to be happening is the InsertPc-Mark.dvb is for some reason getting loaded twice (when the error pops, I can see two identical entries in the VBA Manager). The User Form (dialog) from the second one is running … but the vlisp code is attempting to close the user form from the first, and since it’s user form isn’t being displayed I get the object required error 424 …. (weird!) When I click ‘Debug’… VBIDE highlights the line in yellow… if I click quit... then that instance quits… but the dialog (actually from the other instance) remains on the screen… I have to quit out of both instances to close out of the errror condition.
When I run the vba from VBIDE... it runs fine, but when I run it via this menu pick I get the error when I close the application.
The intent… to close the app I use one of two methods… one for when the lisp is done from the visual lisp code:
(if startedfromVBA (vl-vbarun "G:\\R2007\\Control_Numbering\\InsertPc-Mark.dvb!basMain.cmdExitVBA"))
Alternatively, a user click on the VBA form closes the VBA app (and the Vlisp code) also… via this function:
[code]
Private Sub cmdExit_Click()
Unload Me ' close the dialog box
SendKeys "{ESC}" ' send an escape key, closes lisp app
End Sub
[/code]
When ran from the menu pick or from AutoCAD’s command prompt, I get the same error and then find two identical entries in VBA Manager. Is vla-