EXE and VBE difference

V

vul

I'm trying to use DLL created in VB 2005 in VB6 project.
I did everything to make it work with late binding. It works when I run
compiled EXE and produces an error 'The system cannot find the file
specified' on the first line of this code:

Dim objXML As Object
Set objXML = CreateObject("WorkorderXML.WorkorderXML") 'it is
WorkorderXML.dll
objXML.ConnectionString = strConnectionString
objXML.WorkorderID = 19
objXML.PathToXML = App.Path & "\Workorder.xml"
 
V

vul

Sorry,
It does work when I run compiled exe. If I attempt to run from VB
environment it produces an error.

Al
 
T

Tony Proctor

Is your VBP file in a different location to your compiled EXE? If so then
the value of App.Path will be different in the two cases. In the IDE it will
be the location of the VBP file, and in the compiled EXE it will be the
location of the EXE file.

Tony Proctor
 
V

vul

VBP and EXE are in the same location. I also start my VBP by double clicking
on it to avoid the problem with App.Path.
DLL is in the same location and was registered with regasm.exe
DLL was developed on different machine. On that machine VB6 client works
fine with both, EXE and VBP
What's the difference?
Al
 
T

TDC

No, the .NET Framework has no notion of your VBP. When in the VB6 IDE,
you need to have your files where the executable is...which is vb6.exe.
Look for it in program files\ms visual studio\etc\etc...

I suggest writing a little BAT file that copys them in and deletes them
out of that dir so you can cleaunp when development is complete.
Otherwise that dir can get awfully messy.

Tom
 
V

vul

I met the problem with locations of MyProject.vbp (MyProject.exe) and VB.exe
awhile ago. I do not remember exactly, but I think it was the problem with
App.Path. It contained the different values when I open my MyProject.vbp by
double clicking on it and when I opened it from Visual Basic environment. In
the second case App.Path contains the path to VB.exe. Since that I always
open my VB projects by double clicking on them. I had no problem with any
file located in App.Path folder with their paths.
Now I have
I'll try to see how it will work when I'll make a copy of the file I'm
working with and place it in VB.EXE folder.

Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top