Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Save File screen? (http://www.go4expert.com/forums/save-file-screen-t5239/)

chico1st 13Jul2007 03:08

Save File screen?
How do you get one of those screens to pop up which allows you to save a file and navigate around windows folders to do so.

Also how to you get the open a file screen.

shabbir 13Jul2007 08:18

Re: Save File screen?
You have OpenFileDialog and SaveFileDialog which help you doing that.

chico1st 16Jul2007 20:21

Re: Save File screen?
I cannot find any information about how to use this with my VisualBasic 6 (it has no help files), can someone please help.
from what I understand OpenFileDialog returns the entire path of the location that you select.
but my code doesnt seem to do anything.

'This does nothing
FName = OpenFileDialog

'This gives me an error
FName = OpenFileDialog()

shabbir 16Jul2007 20:41

Re: Save File screen?
I though you would be using the .NET but VB 6 there is a control for the same.

munkyeetr 16Jul2007 21:19

Re: Save File screen?
Use the CommonDialog Control.

chico1st 18Jul2007 01:49

Re: Save File screen?
Ok when i click cancel in the open file dialogue i want to execute a command. But by using
"on error goto cancel" the code in Cancel wont execute one i have executed the loaded a file once. in fact crazy things start to happen. is there any sort of "On cancel exit sub" or something, this is the outline of my code

Private Sub cmdLoad_Click()

On Error GoTo Cancel
Exit Sub

Exit Sub

End Sub

thank you for your time

chico1st 18Jul2007 06:25

Re: Save File screen?
nevermind i needed to click the "cancel error" box in the properties of the dialogue box. Apparently without that it wont always give an error.

All times are GMT +5.5. The time now is 15:46.