Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: Folder Dialog

  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Folder Dialog

    I forget if I've asked this before, but since I don't have the code for it -- and I need it now -- I'll as again.

    Is there a folder dialog (or have you got folder dialog code) that allows the use to choose a folder and return its name to the program? If it worked just like the File Locations Modify dialog that would be peachy!
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  2. #2
    JustCallMeAl
    Guest

    Re: Folder Dialog

    Try this:

    <pre> With Dialogs(wdDialogCopyFile)
    If .Display() <> -1 Then Exit Sub
    MyPath = .Directory
    End With
    </pre>


  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Folder Dialog

    Al,

    Very nice. Thank you. Anyway to change the window title? I tried .caption = "My Title", got no error, but got no change either.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  4. #4
    JustCallMeAl
    Guest

    Re: Folder Dialog

    I would doubt it as it is a default Word dialog box. Maybe with APIs?

    I checked the help files and couldn't find anything. Oh, by the way, I stole the code from somewhere else, again, can't remember where.

    Glad to help. And, again, thanks on the FileExist function.

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Folder Dialog

    Glad to help too.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  6. #6
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Folder Dialog

    didn't i post that about a month ago? or do i not understand what you're after?
    try this
    Brooke

  7. #7
    JustCallMeAl
    Guest

    Re: Folder Dialog

    Absolutely marvelous code!

    Wow!

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Folder Dialog

    Brooke,

    Yes! Thanks. I guess I printed it out and forgot about it. Too many things going on a once, I guess. Thanks for "reminding" me.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  9. #9
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Folder Dialog

    Brooke,

    Two things you might be able to help with re: the SHBrowseForFolder function.

    1) I'd like to position it in the center of the screen. It defaults to almost upper left.

    2) What are the hex values for the other ulFlags options? I want to try the newer dialog so the user can resize. I've got the MSDN BROWSEINFO, but it just lists the contstants and not the values. Thanks.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  10. #10
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Folder Dialog

    Hey, I've now got the value for the newstyle dialog (&H40). So I only now need to know how to position that thing. Any hints are appreciated. Thanks.

    If anyone is watching or interested:

    <A target="_blank" HREF=http://www.vbapi.com/ref/b/browseinfo.html>http://www.vbapi.com/ref/b/browseinfo.html</A>
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  11. #11
    JustCallMeAl
    Guest

    Re: Folder Dialog

    Thanks for the link.

  12. #12
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Folder Dialog

    Unlikely. I ripped from I know not where. I just use the code as it stands and have never really played with it. I don't understand API functions, I just abuse them - but if I get a break from saving the universe in the next couple of days..... It is listed in the Allapi guide though....

    Brooke

  13. #13
    Rene Vargas
    Guest

    Re: Folder Dialog

    Sorry for jumping in but ... what modifications to the Folder Dialog Code are needed in order to go "beyond" the folder path and include the filename? Grabbing the full path of a file is exactly what I need . . .
    Thanks for your help . . .
    Rene

  14. #14
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Folder Dialog

    I think if you don't set any flags you'll get the entire path with filename.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  15. #15
    Rene Vargas
    Guest

    Re: Folder Dialog

    Sorry . . . I forgot to point out that I am not "well versed" in VBA. My "experience" is limited to writing VERY simple code [img]/forums/images/smilies/sad.gif[/img]

    Thus, your answer --although greatly appreciated-- leaves me perplexed [img]/forums/images/smilies/sad.gif[/img] Can u further explain to me what you mean.

    Sorry for this "extra work". . .

    Rene

Page 1 of 2 12 LastLast

Posting Permissions

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