specify default path in dialog open box

  • Thread starter Thread starter Striker
  • Start date Start date
S

Striker

I am using the Following to open a csv file. Is it possible to specify a
default directory path for the dialog box? For instance I would like the
box to open by default pointing to this directory K:\CSR\CDM

sfile1 = Application.GetOpenFilename("Text Files (*.csv), *.txt")
If sfile1 <> "" Then
Open sfile1 For Input As 1
End If

THanks
 
ChDrive "K:\CSR\CDM\"
ChDir "K:\CSR\CDM\"
sfile1 = Application.GetOpenFilename("Text Files (*.csv), *.txt")

HTH. Best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

keep formatting 2
Open CSV file 1
Help with activating window from Application.GetOpenFilename 4
Inset into SQL 1
VBA to VB 12
Open Workbook Question 1
GetOpenFilename with default filename? 5
File Open Dialog Box 2

Back
Top