Am using a dialog box to select a few files
after-clicking on a command button
So, say, I puck a file from U:
then click again...
How do I make it default to the last drive I selected from
because it keeps going back to C:
Thanks in advance
Printable View
Am using a dialog box to select a few files
after-clicking on a command button
So, say, I puck a file from U:
then click again...
How do I make it default to the last drive I selected from
because it keeps going back to C:
Thanks in advance
Get the full path of the file selected then use the InitDir property of the dialog to set the new dir.
Make a reference to the Scripting runtime in your project
Code:Dim fs As FileSystemObject
Private Sub Form_Load()
Set fs = New FileSystemObject 'CreateObject("Scripting.FileSystemObject")
End Sub
Private Sub c2_Click()
Dim s As String
commonDialog1.ShowOpen
commonDialog1.InitDir = fs.GetAbsolutePathName(commonDialog.FileName)
End Sub
:)
[Edited by hitcgar on 10-03-2000 at 12:31 PM]
Thanks..
Will try it right now