Opening an fotran .exe file from Visual Basic

  • Thread starter Thread starter jaap de vries
  • Start date Start date
  • Tags Tags
    File Visual
AI Thread Summary
To execute a Fortran .exe file from Visual Basic, the Shell command can be used effectively, allowing users to run the executable with a button click. However, issues may arise when the Fortran program attempts to read input from a file when launched through Visual Basic, even though it functions correctly when run directly from the Fortran compiler. This indicates that the working directory or file path context may differ when the executable is called from Visual Basic, potentially affecting its ability to locate and read the input files. Adjusting the working directory or ensuring the input file path is correctly specified may resolve this issue.
jaap de vries
Messages
166
Reaction score
0
Opening a fortran .exe file from Visual Basic

Dear friends,

I want to do something that is probably not too hard, I just can't figure it out. I want to call a executable (.exe) file that I have written in Fortran from my visual basic code. Let's say push a button and it automatically runs my (.exe) program. This way I would combine computational efficiency with a nice graphical user interface.

Any suggestions?
 
Last edited:
Computer science news on Phys.org
As far as i remember there was a command like:

Shell("c:\wherever\something.exe")
 
Thanks this seems to work.
 
Hi, I tried the shell command in visual basic and it works, but the problem is the something.exe file is not able to read the input from a file. However when it is opened directly (ie not from visual basic, but from fortran compiler), it works fine. Can you help me?
 
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...
I came across a video regarding the use of AI/ML to work through complex datasets to determine complicated protein structures. It is a promising and beneficial use of AI/ML. AlphaFold - The Most Useful Thing AI Has Ever Done https://www.ebi.ac.uk/training/online/courses/alphafold/an-introductory-guide-to-its-strengths-and-limitations/what-is-alphafold/ https://en.wikipedia.org/wiki/AlphaFold https://deepmind.google/about/ Edit/update: The AlphaFold article in Nature John Jumper...
Back
Top