Ik denk

dat ik eruit ben.
Je opent Excel met Visual Lisp vanuit AutoCAD.
Dit betekent dat lisp de "eigenaar" wordt van van het object
Excel en het object
worksheet.
Nu start je VBA op en die wil hetzelfde >>>> OORLOG. Waar twee honden vechten om hetzelfde been loopt het programma vast.
Ik denk

dat het mogelijk is om een vba-routne cq userform in Excel op te starten vanuit Visual Lisp maar Ik heb hier geen ervaring mee.
Hieronder een uittreksel van AfraLisp in het engels over het laden en runnen van een vba routine via lisp.
Loading VBA Files
There are two AutoCAD functions that can you would use to Load and Run VBA Applications namely,
VBALOAD and VBARUN. In a menu file you would use them like this :
[Test]^C^C^C^P-vbaload test.dvb -vbarun Module1.MyTest
Or, in an AutoLisp routine, you would write something like this :
(command "vbaload" "test.dvb")
(command "-vbarun" "Module1.MyTest")
The VBALOAD function has one serious flaw though!
If a VBA application is already loaded, and you run VBALOAD again, you get an error message. Try it
out :
Command: -vbaload
Initializing VBA System...
Open VBA Project: test.dvb
Now try and load it again.
Command: -vbaload
Open VBA Project: test.dvb
You should get an error message :
"File already loaded d:/drawings/test.dvb"
This is where Visual Lisp come into play.
The function (VL-VBALOAD) behaves much like the command VBALOAD. You need to supply the file
name of a project or DVB file. The complete file name should be provided along with the path and DVB
extension. For example, if you want to load a project named MyProject.dvb in the C:\MyWork\ folder, the
(VL-VBALOAD) function call would appear as follows.
(VL-VBALOAD "C:/MyWork/MyProject.DVB")
You should note a couple of things right away. Visual LISP makes use of forward slashes when
separating folder or directory names. Also, the parentheses are required and the extension DVB is
needed for the project to be properly located.
Unlike the VBALOAD command, this function will not generate an error if the project has already been
loaded into the current drawing environment. Thus, programs can proceed smoothly by just calling the
load function and then calling the run function without concern about the project already being loaded.
Another interesting feature is that the Enable Macros/Virus Warning message does not appear when you
use the Visual LISP approach.
Therefore, your menu macro :
[Test]^C^C^C^P-vbaload test.dvb -vbarun MyTest
can be replaced with the following one:
[Test]^C^C^C^P(vl-vbaload "test.dvb")(vl-vbarun "MyTest")
And of course, your AutoLisp coding should be replaced with this :
(vl-vbaload "test.dvb")
(vl-vbarun "MyTest")