Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetOpenFileName
Hi, Is there a way to select the folder path as opposed to the file path using this method. directory = Application.GetOpenFilename("Excel Files (*.xls), *.xls") I want to use the save as window, similar to selecting the file path with the above line. Things is I want the folder/directory path. Any ideas would be greatly appreciated. Cheers, Tom -- Tomski ------------------------------------------------------------------------ Tomski's Profile: http://www.excelforum.com/member.php...o&userid=26824 View this thread: http://www.excelforum.com/showthread...hreadid=472937 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetOpenFileName
Hi
See the second example on this page http://www.rondebruin.nl/windowsxpzip.htm You can use the code from that macro -- Regards Ron de Bruin http://www.rondebruin.nl "Tomski" wrote in message ... Hi, Is there a way to select the folder path as opposed to the file path using this method. directory = Application.GetOpenFilename("Excel Files (*.xls), *.xls") I want to use the save as window, similar to selecting the file path with the above line. Things is I want the folder/directory path. Any ideas would be greatly appreciated. Cheers, Tom -- Tomski ------------------------------------------------------------------------ Tomski's Profile: http://www.excelforum.com/member.php...o&userid=26824 View this thread: http://www.excelforum.com/showthread...hreadid=472937 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetOpenFileName
Tom,
This gives you the folder for the file selected in GetOpenFileName... '------------------------------- Sub FolderFromFilePath() Dim strLocation As Variant Dim N As Long strLocation = Application.GetOpenFilename("Excel Files (*.xls), *.xls") If strLocation = False Then Exit Sub For N = Len(strLocation) To 1 Step -1 If Mid$(strLocation, N, 1) = "\" Then Exit For Next strLocation = Left$(strLocation, N - 1) MsgBox strLocation End Sub '------------------------- Jim Cone San Francisco, USA "Tomski" wrote in message ... Hi, Is there a way to select the folder path as opposed to the file path using this method. directory = Application.GetOpenFilename("Excel Files (*.xls), *.xls") I want to use the save as window, similar to selecting the file path with the above line. Things is I want the folder/directory path. Any ideas would be greatly appreciated. Cheers, Tom |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetOpenFileName
Nice one guys, thanks for that. -- Tomsk ----------------------------------------------------------------------- Tomski's Profile: http://www.excelforum.com/member.php...fo&userid=2682 View this thread: http://www.excelforum.com/showthread.php?threadid=47293 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
GetOpenFileName with F*.txt | Excel Programming | |||
GetOpenFilename | Excel Programming | |||
GetOpenFileName | Excel Programming | |||
GetOpenFilename | Excel Programming | |||
GetOpenFilename | Excel Programming |