starstarhk
asked on
how to make a default file name in a save file dialog for users
hi everybody...I wanna know how to make a default file name in a save file dialog for users
and I want to open a text file in VB ...how can I do that....?
Thanks
and I want to open a text file in VB ...how can I do that....?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't know about FileSystemObject and SaveDialog, I have a different way to do it, its through a module. If you wish, I can provided to you.
Now for your second part,
Do you want to open a txt file and read its content from VB,
(I already gave you the answer for this option)
OR
Open a txt file in notepade?
Dim myProcess as New Process()
myProcess.StartInfo.FileNa me = "Notepad.exe"
myProcess.StartInfo.Window Style = ProcessWindowStyle.Maximiz ed
myProcess.Start()
jaffer
Now for your second part,
Do you want to open a txt file and read its content from VB,
(I already gave you the answer for this option)
OR
Open a txt file in notepade?
Dim myProcess as New Process()
myProcess.StartInfo.FileNa
myProcess.StartInfo.Window
myProcess.Start()
jaffer
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Agreed.
ASKER
SaveDialog.CancelError = True
On Error GoTo ErrHandler
SaveDialog.DialogTitle = "Save your File!"
SaveDialog.Filter = "Text File(*.txt)|*.txt|"
SaveDialog.ShowSave
fileName = SaveDialog.fileName
If Not FSO.FileExists(fileName) Then ' if not exist→Create
Set TS = FSO.CreateTextFile(fileNam
Else ' if exist→Open
Set TS = FSO.CreateTextFile(fileNam
End If
And how to open a text file...is it ShellExecuteEX(....,.....)