specify default path in dialog open box

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
 
H

Harald Staff

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

Top