Problem with calling .dll from excel VBA

Joined
Jul 5, 2005
Messages
1
Reaction score
0
Hello!

Well, here is my problem:
I've written a simple code in VBA, in order to call a fortran .dll from excel!
Everything's fine with the call, but the problem arises when it reads the input.
And I'm getting more specific: the .dll has as input an .inp file which I've placed in the same directory as the excel file and the .dll, but Excel (which probably recognizes "My Documents" as its default directory) opens My Documents to search for the .inp file, so the whole process is completed only if the .inp is located in My Documents directory, otherwise, an error message (from visual fortran "end of file during read" or something like that) emerges.

All I want is to be able to define where the .inp file is located, either hardcoded (by writing the whole path in the code), or explicitly (by the user through an option), or even by being in the same directory with the excel file,... or whatever you could think of!
Any suggestions?
Please feel free to ask me whatever you think it could make my problem more clear to you!

Thank you in advance for your time!

Athina
 

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