Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetOpenFilename - Default Folder
Hi I apologise if I am asking a commonly question this newsgroup has
answered before. I pick up a file selected by the user. I want to specify a default folder from where my user can select his transaction file. Is this possible? This is what I am currently doing. TxnFilename = Application.GetOpenFilename("All Files (*.*), *.*", 1, "Import Transaction Details for List") Thanks Andy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetOpenFilename - Default Folder
Andy,
Use a chdir statement. ie ChDir ("C:\My Excel Files") TxnFilename = Application.GetOpenFilename("All Files (*.*), *.*", 1, "ImportTransaction Details for List") Dan E "Andy" wrote in message ... Hi I apologise if I am asking a commonly question this newsgroup has answered before. I pick up a file selected by the user. I want to specify a default folder from where my user can select his transaction file. Is this possible? This is what I am currently doing. TxnFilename = Application.GetOpenFilename("All Files (*.*), *.*", 1, "Import Transaction Details for List") Thanks Andy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetOpenFilename - Default Folder
Try this example sub
I will save your default folder first to set it back at the end Sub test() Dim SaveDriveDir As String Dim TheFileName As Variant SaveDriveDir = CurDir ChDrive "C" ChDir "C:\Data" TheFileName = Application.GetOpenFilename(filefilter:="Excel Files (*.xls), *.xls") MsgBox "your code" ChDrive SaveDriveDir ChDir SaveDriveDir End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Andy" wrote in message ... Hi I apologise if I am asking a commonly question this newsgroup has answered before. I pick up a file selected by the user. I want to specify a default folder from where my user can select his transaction file. Is this possible? This is what I am currently doing. TxnFilename = Application.GetOpenFilename("All Files (*.*), *.*", 1, "Import Transaction Details for List") Thanks Andy |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetOpenFilename - Default Folder
Works like a charm.
Many thanks Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
... I'd like to change the Default Folder... | Excel Discussion (Misc queries) | |||
how can i change my default working folder to a networked folder? | Excel Discussion (Misc queries) | |||
"Save As" folder -- can I default this to the same folder as origi | Excel Discussion (Misc queries) | |||
specifing default folder with GetOpenFilename | Excel Programming | |||
Setting default directory prior to GetOpenFilename | Excel Programming |