Problem with calling .dll from excel VBA

A

atellidou

Hello!

Well, here is my problem:
I've written a simple code in VBA, in order to call a fortran .dll fro
excel!
Everything's fine with the call, but the problem arises when it read
the input.
And I'm getting more specific: the .dll has as input an .inp file whic
I've placed in the same directory as the excel file and the .dll, bu
Excel (which probably recognizes "My Documents" as its defaul
directory) opens My Documents to search for the .inp file, so the whol
process is completed only if the .inp is located in My Document
directory, otherwise, an error message (from visual fortran "end o
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 explicitl
(by the user through an option), or even by being in the same director
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 proble
more clear to you!

Thank you in advance for your time!

Athin
 

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