-
Hi,
Does anyone know how to select a directory through code? When a common dialog control is opened you can only press o.k. when a file is selected, what happens if you want to be able to specify the directory and not individual files?
Cheers for any help
Steve
-
Check out this post, if it's not what you're looking for search for it and I'm sure you'll find an answer.
http://forums.vb-world.net/showthrea...threadid=25451
-
<?>
not sure what you are after
to go to a specific directory with commondialog
Code:
'Set the properties of the text control
' change "C:\" to "your choice of dir"
CommonDialog1.InitDir = "C:\"
-
Thanxs for that, should do the trick nicely !!!
-
To HesaidJoe
no I am already using the initfile but only specifies the startup directory for the dialog box. What I was after was the ability to select a directory, click o.k. and the dialog box to close. This only seems to happen when an individual file is selected. I have tried setting different flag numbers but that doesn't seem to work either.
Steve
-
Why not use a DirListBox?
-
Because unfortunately I can't add one in Excel (don't know why that is either but I posted a question on that the other day)
Cheers for all the help
Steve