Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SCROLL BARS GSB Excel Discussion (Misc queries) 1 September 28th 07 05:03 PM
Scroll bars Tazzy via OfficeKB.com Excel Discussion (Misc queries) 3 December 10th 06 10:28 PM
Scroll bars Embalmer Excel Discussion (Misc queries) 1 December 31st 05 05:05 PM
Controlling dialog programatically IanC Excel Programming 10 June 30th 05 06:25 AM
What is a clean way of controlling Scroll bars when using filters with Userforms? Bruccce Excel Programming 4 September 2nd 03 10:31 PM


All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"