Results 1 to 7 of 7

Thread: Simple problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    178

    Question

    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

  2. #2
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Sudbury, Ontario, Canada
    Posts
    274
    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

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    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:\"
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    178

    Thumbs up

    Thanxs for that, should do the trick nicely !!!


  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    178

    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

  6. #6
    Guest
    Why not use a DirListBox?

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    178
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width