+ Reply to Thread
Results 1 to 2 of 2

Controlling scroll bars in file dialog

  1. #1
    RD
    Guest

    Controlling scroll bars in file dialog

    Does anybody have any idea how to control the scroll bars in the file dialog
    that would appear when you want to open a file or multiple files.

    Basicailly, I'd like the scroll bar to be at the beginning the first time
    it's run. Then each subsequent time the macro runs, it would record the last
    position of the file list and use it the next time open is called.

    I found doc's for controlling the scroll bars of your own list boxes, but
    how to control the system open scroll bars baffles me.

  2. #2
    NickHK
    Guest

    Re: Controlling scroll bars in file dialog

    With the Open dialog, you have no option to set the initial name and
    therefore no hope to preselect a file and move the scroll-bars. The
    GetSaveAsFilename, does have an initialname property, but does not select
    the file anyway.
    The main problem is that because you are showing a Dialog, it is shown
    modally; hence no code runs until it is dismissed.

    To me, the easiest solution would be to make you own (simplified) file
    dialog userform, then you can control any and all aspects of its behaviour.
    Use a listview control to get the same look as the standard Windows dialogs.
    The alternative is supplying a hook to the Windows GetOpenFileName API and
    use SendMessage to make your changes. Note that this method substantially
    more complex the solution above.

    But with MultiSelect set to True, can the user not select all the files
    needed in one go ?

    NickHK

    "RD" <[email protected]> wrote in message
    news:[email protected]...
    > Does anybody have any idea how to control the scroll bars in the file

    dialog
    > that would appear when you want to open a file or multiple files.
    >
    > Basicailly, I'd like the scroll bar to be at the beginning the first time
    > it's run. Then each subsequent time the macro runs, it would record the

    last
    > position of the file list and use it the next time open is called.
    >
    > I found doc's for controlling the scroll bars of your own list boxes, but
    > how to control the system open scroll bars baffles me.




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1