Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default dumb question

hello,

how to set the default path that the filedialog looks at?

i see an application default path but i cant seem to set it. and the file
dialog object doesnt seem to have that property

thanks for any hint

jm


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default dumb question

Just keep track of where you are, change to where you want to be, show the
dialog and set it back to where you we

(Most of this was stolen from the help for .filedialog)

Option Explicit
Sub testme()

Dim lngCount As Long
Dim curFolder As String
Dim newFolder As String

curFolder = CurDir
newFolder = "C:\test"

ChDrive newFolder
ChDir newFolder

' Open the file dialog
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = True
.Show

' Display paths of each file selected
For lngCount = 1 To .SelectedItems.Count
MsgBox .SelectedItems(lngCount)
Next lngCount

End With

ChDrive curFolder
ChDir curFolder

End Sub




john m wrote:

hello,

how to set the default path that the filedialog looks at?

i see an application default path but i cant seem to set it. and the file
dialog object doesnt seem to have that property

thanks for any hint

jm


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default dumb question

John
Click on Tools - Options - General tab. Look for "Default file
location:" Put the entire path to the folder you want. HTH Otto
"john m" wrote in message
...
hello,

how to set the default path that the filedialog looks at?

i see an application default path but i cant seem to set it. and the file
dialog object doesnt seem to have that property

thanks for any hint

jm




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dumb Question David Excel Worksheet Functions 2 May 28th 07 08:13 PM
dumb question uw805 Excel Worksheet Functions 6 June 8th 06 05:06 PM
Dumb VBA question nobbyknownowt Excel Discussion (Misc queries) 0 April 23rd 06 08:12 AM
Very dumb question gregorsamsa Excel Discussion (Misc queries) 2 March 23rd 06 03:15 PM
Really Dumb Question Novice[_8_] Excel Programming 4 December 19th 03 01:20 AM


All times are GMT +1. The time now is 06:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"