Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Excel Combo Box - Problem 1

Status
Not open for further replies.

ScottXJ

Programmer
Aug 14, 2002
51
CA
Hello,

I am currently working on a MS Excel 2000 form which makes use of a combo box. The combo box is working properly for the most part, however, when a user scrolls using their wheel, the entire worksheet scrolls down and the combo box scrolls along with the worksheet. Is there any way to trap/disable the scroll wheel or anchor the combo box so it does not move when the scroll wheel is used?

Any assistance would be appreciated.

Thanks,

Scott.
 
Scott,

Your control object has been placed on a Sheet as opposed ot being in a Window. If you look at the Object Heirarchy in help, you'll see that control objects cannot be children of Window Objects, but can be children of Worksheet Objects.

The Sheet is scrolled -- your object scrolls with the Sheet. Thats the way it works.

BTW, when you used the term form, it implies that you have a UserForm on which your control resides.



Skip,
[sub]
[glasses] [red]Be advised:[/red]When Viscounts were guillotined just as they were disclosing where their jewels were hidden, it shows to go that you should...
Never hatchet your Counts before they chicken! [tongue][/sub]
 
Skip,

Thank you for the information. I apologize for not being more clear in my definition of a "form". I am not making use of a UserForm. The control resides on a worksheet. So, because control objects cannot be children of Window objects, I assume there is no way to prevent my combo box from scrolling along with the worksheet when the scroll wheel is used? I guess this is just something that will have to be accepted by the users if we cannot find a way to trap for the scroll event of the mouse.

Thanks for your help,

Scott.
 
You can put the combobox in the top row or 2 of the sheet and then "Freeze" (Window>Freeze Panes) the panes at a row just below it. the scrolling will then not affect the top few rows and you can keep the combobox at the top of the screen.

This does not detract from anything Skip has written - it is merely a workaround and therefore also has limitations itself...

Rgds, Geoff

"Errors have been made....Others will be blamed"

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top