I'm new to vb 2005 and am having problems with save as dialog code, when i go to save a file it returns "file not found" but when it looks at a file on the pc then it will save,
can someone help & tell me whats missing?? i have listed the code below
Expand|Select|Wrap|Line Numbers
- Dim iResult As DialogResult
- iResult = SaveFileDialog1.ShowDialog()
- SaveFileDialog1.Title = "Specify a Name for the File"
- SaveFileDialog1.Filter = "Text Format (*.txt) | *.txt"
- SaveFileDialog1.AddExtension = True
- SaveFileDialog1.OverwritePrompt = True
- SaveFileDialog1.InitialDirectory = "C:\"
- SaveFileDialog1.FileName = ""
- If iResult <> Windows.Forms.DialogResult.Cancel And SaveFileDialog1.FileName.Length <> 0 Then
- F3mainreport.SaveFile(SaveFileDialog1.FileName)
- End If