VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VBA from Lisp problem

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
167 Views, 2 Replies

VBA from Lisp problem

Can anybody tell me why if I run the macro runs OK, but if I make it run
inside a LISP routin even if it works OK, gives me a message : Execution
error"VEOMAT"

I attached the Lisp Routin and the VB code

Any answear will be thanks



-----LISP routin----------
(defun c:vbs (/ nomedvb path nome sldxvb ext tit)
(vl-load-com)
(setq path "D:\\PROGESOFT\\"); or the path you want for the JPG file
(setq tit "TITLE")
(setq nomedvb "FPCCV");
(setq nome (strcat path nomedvb ".dvb"))
(setq sldxvb "PAV-0001"); the file name
(setq ext "JPG")
(setq sldxvb (strcat path "BITMAPS\\" sldxvb "." ext))
(setvar "USERS1" sldxvb)
(setvar "USERS2" tit)
(vl-vbaload nome)
(vl-VBARUN "VEOMAT")
)




VBA

---Module ---
Sub Veomat()
UserForm1.Show
End Sub




Has one IMAGE (Image1 and one CommandButton (cmdAcepta)

---UserForm1---

Private Sub cmdAcepta_Click()
End
End Sub

Private Sub UserForm_Initialize()
Dim strVar1 As String
Dim strVar2 As String
strVar1 = ThisDrawing.GetVariable("USERS1")
strVar2 = ThisDrawing.GetVariable("USERS2")
Image1.Picture = LoadPicture(strVar1)
UserForm1.Caption = strVar2
End Sub
2 REPLIES 2
Message 2 of 3
fantum
in reply to: Anonymous

> Can anybody tell me why if I run the macro runs OK, but if I make it run
> inside a LISP routin even if it works OK, gives me a message : Execution
> error"VEOMAT"

> Private Sub cmdAcepta_Click()
> End <<----------<<<<<<< This is why.
> End Sub
Message 3 of 3
Anonymous
in reply to: Anonymous

And to expand on this, change the "End" to "Unload Me"

wrote in message news:5068746@discussion.autodesk.com...
> Can anybody tell me why if I run the macro runs OK, but if I make it run
> inside a LISP routin even if it works OK, gives me a message : Execution
> error"VEOMAT"

> Private Sub cmdAcepta_Click()
> End <<----------<<<<<<< This is why.
> End Sub

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost