Change directory
Unfortunately, I am using excel 97, so that method doesn't work.
But thanks for your help!
"Stefi" wrote:
Hi Jeff,
Try this method:
Sub test()
With Application.FileDialog(msoFileDialogFolderPicker)
If .Show = 0 Then
y = ""
Else
y = .SelectedItems(1)
End If
End With
End Sub
Regards,
Stefi
€˛Jeff€¯ ezt Ć*rta:
Hi,
I was using the ChDir = "C:\Temp" to change the directory
Is there anyway to specify the directory, and then save the path as a
string. I was trying.
myFileName = Application.GetOpenFilename("Excel Files, *.xls")
y = Dir(myFileName, vbDirectory)
but y was just set to the filename, I wanted the path like "C:\Temp"
Thanks for your help!
|