Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
specifing default folder with GetOpenFilename
I'm am using the GetOpenFilename method to allow a user to
pick a spreadsheet to open. This is to by-payss the enable/disable macro option. I want to start the user in a specific network folder(instead of their defaultfilepath). Is there a way to do this? I have tried the Application.DefaultFilePath = ("xxxx") but this only changes the default folder the next time the user accesses the the system and not the current instance. Thanks, Brian. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
specifing default folder with GetOpenFilename
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 "Brian" wrote in message ... I'm am using the GetOpenFilename method to allow a user to pick a spreadsheet to open. This is to by-payss the enable/disable macro option. I want to start the user in a specific network folder(instead of their defaultfilepath). Is there a way to do this? I have tried the Application.DefaultFilePath = ("xxxx") but this only changes the default folder the next time the user accesses the the system and not the current instance. Thanks, Brian. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
specifing default folder with GetOpenFilename
-- HTH Bob Phillips "Brian" wrote in message ... I'm am using the GetOpenFilename method to allow a user to pick a spreadsheet to open. This is to by-payss the enable/disable macro option. I want to start the user in a specific network folder(instead of their defaultfilepath). Is there a way to do this? I have tried the Application.DefaultFilePath = ("xxxx") but this only changes the default folder the next time the user accesses the the system and not the current instance. Thanks, Brian. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
specifing default folder with GetOpenFilename
Brian,
Use ChDrive and ChDir, ChDrive "C:\" ChDir "C:\" -- HTH Bob Phillips "Brian" wrote in message ... I'm am using the GetOpenFilename method to allow a user to pick a spreadsheet to open. This is to by-payss the enable/disable macro option. I want to start the user in a specific network folder(instead of their defaultfilepath). Is there a way to do this? I have tried the Application.DefaultFilePath = ("xxxx") but this only changes the default folder the next time the user accesses the the system and not the current instance. Thanks, Brian. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Specifing Cells to Sum on Condition | Excel Worksheet Functions | |||
how can i change my default working folder to a networked folder? | Excel Discussion (Misc queries) | |||
Change Default Add-in Folder | Excel Discussion (Misc queries) | |||
"Save As" folder -- can I default this to the same folder as origi | Excel Discussion (Misc queries) | |||
Setting default directory prior to GetOpenFilename | Excel Programming |