Results 1 to 6 of 6
  1. #1
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Open Dialog (Excel 97 and >)

    Ladies and gentelmen...

    OK when I ask the user to open a workbook I display the built-In Open Dialog. This is handy and saved a lot of coding. BUT...

    My users are either "dumb" or "lazy" or both... I have found that when you have a couple or more folders and a couple or more workbooks in the folder that you are trying to open the workbook from, Excel scrolls the list and highlight the first workbook it finds.

    This may hide some of the folders that I actually want the User to look into, and they call me and they say the folder they need is not there...

    So how do I make Excel not select the first workbook and scroll?

    TIA

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Silicon Valley, California, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Dialog (Excel 97 and >)

    Hi Wassim,

    This is indeed an annoying behavior, which drives me nuts, because my default directory has just enough folders to fill the list, so I always end up "missing" the top folder. For that matter, it doesn't even care if there is a workbook; if not, it simply highlights the first file in the folder @#$%&*!

    Anyway, I can't detect any way to prevent that kind of behavior. Sorry. If you could switch to List view, it might help, but there is no parameter for it in the VBA implementation, and Details is apparently the default view.

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Open Dialog (Excel 97 and >)

    Hi Wassim.
    I find that if I use
    Dialogs(xldialogopen).show "*.*"
    in Excel 2000 it doesn't select anything and shows the list of folders and files from the top.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Open Dialog (Excel 97 and >)

    Nice catch Rory, just confirmed it in Excel 97 , though it did look for the Application qualifier as in :

    Application.Dialogs(xlDialogOpen).Show "*.*"

    Thanks

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Open Dialog (Excel 97 and >)

    oops - thanks for pointing out the missing Application. - I was too lazy to type it in!
    Regards,
    Rory

    Microsoft MVP - Excel

  6. #6
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Open Dialog (Excel 97 and >)

    I figured that because if you copied it from the VBE it would have some capitalisation.

    But I put it down to too busy rather than too lazy.

Posting Permissions

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