07-07-2011 09:25 PM
Everytime I hit the run button the file path prompt opens up, how can I disable it? I want to manual click the folder icon to open up browse window. Here is my code.
07-07-2011 09:43 PM - edited 07-07-2011 09:44 PM
If the path control is empty, then the Read Spreadsheet File will automatically pop up a File Open dialog box.
What you need to do is select a path BEFORE you run your VI.
07-07-2011 10:24 PM
Is there a way to leave it empty and not have the dialog box open?
07-07-2011 10:44 PM
@panoramarts wrote:
Is there a way to leave it empty and not have the dialog box open?
What would be the point to run the VI if there is no file to open???
You could use a loop and an event structure and place the file operations inside an event case that is triggered by a value change of the path control.
07-07-2011 11:31 PM
I have other things happening so I don't want a dialog box for file path as the first thing to happen. Just like in any software it does not ask you for file path once you open up a program unless its targetted to do so. It would be nice that if could click browse button and navigate through the file, but don't need a prompt.
07-08-2011 12:02 AM
So... did you try my suggestion?
07-08-2011 08:59 AM
@panoramarts wrote:
Just like in any software...
Well, that doesn't magically happen. Someone had to write it that way. This means you have to write it that way too....
07-08-2011 11:07 AM
@panoramarts wrote:
I have other things happening so I don't want a dialog box for file path as the first thing to happen. Just like in any software it does not ask you for file path once you open up a program unless its targetted to do so. It would be nice that if could click browse button and navigate through the file, but don't need a prompt.
That's all well and good, but any other software tends to be able to other stuff. Your program only does one thing, read a spreadsheet file. Nothing else. If you don't want it to do that right away, then you need to follow Altenbach's suggestion and program in an event structure that waits until the file path has changed. Then once you do that, you will need to handle some other things like what if the user Cancels the dialog box. Or they enter a filename that doesn't exist.