Mouse Wheel Scroll In A Combobox On Userform (Lots Of Code)
Sep 16, 2007
I have seen some code around that allows scrolling in listboxes using the mousewheel. I have also seen some code here on the forums about scrolling through a combobox embedded in a workbook. I have tried adapting both of these to suit a combobox on a userform but I cannot get either to work.
Here is the code that I used for the embedded combobox; I added it to the base code for the userform
I then added the following code to a standard module as stated in the forum post;
In the first section of the code there is a msgbox that never gets shown so I don't think code is recognizing the mouse wheel at all.
The second set of code that I used was set up to work with a listbox and it works perfectly with a listbox control. The problem is I cannot adapt it to suit a combobox and if I use a breakpoint to see what is happening Excel freezes.
The following code is added to the userforms code;
Then in a standard module I added the following code;
I added this section of the code;
I think this should only work on a Combobox but a Combobox does not appear to support the TopIndex value. Is there a way this can be setup to work with a userform combobox?
Sorry about the huge amount of code.
View 9 Replies
ADVERTISEMENT
Jul 29, 2005
how to enable the mouse scroll wheel in VBA?
I'm talking about the little wheel in the middle of the two mouse buttons, the one that you can use to scroll up and down through documents etc.
View 8 Replies
View Related
Sep 16, 2012
Scroll with Wheel Mouse in ListBox?
View 1 Replies
View Related
Jul 18, 2008
How can i make my mouse wheel scroll an excel sheet sideways instead of up and down?
my sheets are only 5 rows big, but some 20 columns and its a pain to move around the sheet efficiently!
View 9 Replies
View Related
Aug 21, 2008
I am having problems with an Excel workbook I am working on. I have a sheet that has a number of controls added to the top of it. Two of these controls are listboxes. My problem is, if I am in the listbox navigating through it, and I accidently move the Mouse Wheel, Excel crashes and I get the usual, "Send Error Report" form.
I have seen that there are other people having this problem and that there are a number of solutions out there but my problem is a bit different. I have a few forms with listboxes on them, and while mouse wheel scrolling doesn't work, it certainly doesn't crash Excel. It only seems to happen when I have a control permanently added to the sheet. Is there any event handler for mouse wheel scrolls or anyway to disable them through VB?
View 2 Replies
View Related
Feb 8, 2012
I'm using Excel 2007. When I try to scroll with the mouse wheel, it doesn't do anything. If I hold down the control key and scroll with the mouse, it zooms in and out. So that works fine, but I can't do the basic scrolling up and down the document with the mouse wheel. There is no "Tools, Options" menu in 2007 so I don't even know where to find this type of option. The options available from the Office button are completely different.
View 4 Replies
View Related
Aug 29, 2006
Is there a way to scroll down the list of entries in a combobox using the mouse wheel instead of clicking on the box to scroll up and down?
View 2 Replies
View Related
Apr 21, 2007
I have a worksheet that serves as a navigation page for the workbook and use the following code to restrict from scrolling off the viewable content. The problem is that the code doesn't kick in until either a click if the mouse or keyboard input. This initially leaves the worksheet open for scrolling until input is received.
How do I make this code activate when the wb is loaded? Code in the Thisworkbook module already makes the menu the visible sheet, and code limiting the scroll area is in the sheet module.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveSheet
.ScrollArea = "A1:L11"
End With
Range("A1").Activate
End Sub
I've also tried using "Range("A1").Select", but it doesn't work either. How can I get this to work correctly?
View 2 Replies
View Related
Oct 22, 2008
I have a workbook with 8 sheets, one of which is the "main" sheet that holds all of my user data for logins at my job (I'm in IT). There are about 4300 users and 23 fields for each user, so there are 4300 rows in the sheet. Other sheets in the book are important, but not as much as this one.
The workbook has a total of over 1000 lines of VBA code right now, as I'm building a tool that finds users, adds users, modifies users, etc. (I know, Access would be smarter for this, but for some reason they want me to use an xls). Most of this code works with the sheet that I'm having the problem on.
This ONE sheet has seemed to disable the functionality of the scroll wheel, and I can't use Page Up or Page Down while in the sheet either. Also, if I select cells with VBA (Sheet2.Range(<range>).Select), it will select the cell, but it will not draw focus to that cell on screen (the sheet will not move at all). The other 7 sheets in the workbook have all regular functionality.
This just started happening a couple days ago, and I've been building the code for about a week, so I'm wondering if it's something in the code...?
Does anyone have any idea what might cause this?
View 14 Replies
View Related
Apr 8, 2014
Is there any method to disable Ctrl + mouse wheel function in excel 2013, actually I want to disable zoom in and out functionality but don't want to disable normal scrolling.
View 2 Replies
View Related
May 15, 2008
I recently upgraded to Excel 2007. I use Excel with "Allow editing directly in cells" unchecked. In previous versions, pressing F2 would not prevent me from using the mouse scroll, but in Excel 2007 I am unable to mouse scroll which makes it bothersome. Is there a setting somewhere that can enable mouse scroll after pressing F2?
this is a work product and we can't use VBA.
View 3 Replies
View Related
Jan 7, 2010
I'm trying to do a few things actually. I am somewhat a newb at programming, although I do understand how C++ and the coding works within Excel. To me, it's like the English language...knowing all of the vocabulary and formatting it right is important. If I don't know the vocabulary, I don't know what options I have.
This tool is being used in the call center I work in. It is to help eliminate repititious information used to notate accounts. I have attached a picture of what the tool looks like so you can have a better idea of what I'm working with. Here are a list of things I'm trying to do which I have searched and not found answers to:
1. I am trying to use a middle mouse scroll to scroll through validation list. This list information is located on a different locked tab. Basically, I have a few rows where a drop down selection can be made and it would be easier to scroll rather than manually moving the slider within the validation list.
2. As you can see, this "tool" an employee and I have created has many buttons. What I would like to do is to be able to click a button on the right and have it "stack" text within a single cell. In other words, if I click the button once, the text may be entered into the "actions taken" cell. If I click another button, I can have the option (or maybe a little "+" next to the button) to add this button's information to the end of the information already entered within the "actions taken" box. I've tried recording and using the keyboard and selecting "end" and then having the text added, but it didn't work. I've seen "loop" VBA code, but I don't want something to repeat, I want it to stack in the cell when clicked manually.
I'm sure there is a way to make the tool much better using VBA code and not use Excel, but I don't have an extensive knowledge of Excel to do something like that. I'm a very fast learner and understand how the coding works, so if you have an idea which may help, and you understand what I'm trying to do here, please provide your .02.
Basically, it's used so the Customer's name and phone number are entered manually, and then just about everything else is automated by the use of the buttons on the right. If I could get the 2 above options to work, it'd be perfect. I just figured out I could eliminate screen flicker and hide the macros working by using:
View 12 Replies
View Related
May 7, 2014
I've just inherited a load of Excel files I need to continue using, but my predecessor has done something that disables the middle-click scroll ability.
I can still scroll up and down by turning the wheel, but I want to be able to click it and scroll in all directions at speed - I didn't realise how much I used this until I couldn't. Can't see anything in the VBA sheet properties, and they are all .xlsx files. Nothing leaps out of the settings either. If I create a new file or a file of mine within the same session, they work fine.
View 1 Replies
View Related
Apr 27, 2011
I have 10 comboboxes - all require exactly the same list. Rather than having to copy the list 10 times in the coding - and changing the combobox name from listcode1, listcode2 etc, is there a loop code which I can add to do this for me??
Private Sub Userform_Initialize()
'Empty txtdate
txtdate.Value = ""[code].....
View 9 Replies
View Related
Apr 25, 2013
I have 4 columns, If column B (Ref No) is filled in, the adjacent columns, C,D and E become mandatory and an input box pops up on screen one after the other for entry into each column.
My problem is that I require a drop down list and not a input box for the final column (status). So i have created a userform with a combobox dropdown. I am having problems connecting the combobox selection to the final column, and for the selected combobox item to go into the right cell like the input box entry currently does.
Attachment 53209test743.xls
I have attached a sheet and also you can see the code below.
Code in Sheet
VB:
Public SaveVal1
Public SaveVal2
Public SaveVal3
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
[Code] .....
View 3 Replies
View Related
Aug 16, 2013
I've prepared an excel file with a pivot table. Now I would like to change the Pivot "Report filter" by using Textbox on Userform. I've attached an excel file as an example.
View 2 Replies
View Related
Oct 28, 2009
On a userform I am using the MouseMove event to dropdown a combobox list. When I move the mouse away from the combobox the list remains dropped down. I want the list to close when the mouse moves away as it hides other controls on the form.
I have tried using MouseMove when over the userform or transparent labels around the combobox to set focus to other controls but this does not close the combobox list. The only way to close the list is to click away from the combobox. I have looked at how to simulate a mouse click but that is beyond my limited understanding of vba. If this is the only way to achieve the required result then I need some patient assistance. I am using Excel 2000 on XP.
View 4 Replies
View Related
Mar 20, 2013
I have an application were I would like to use an Active X combo box instead of a regular dropdown list. The list contains 64 items and the text becomes very small in a standard dropdown list. Using an Active X Combo Box allows me to enlarge the text for easier viewing but with 64 items the list tends to run off the sheet. Is their a switch or some other way (scrolling) to make it more viewer friendly?
View 5 Replies
View Related
Jul 27, 2007
I am building a form for use in Excel. The form is going to be rather long. I want to use the vertical scroll bar, but I can't seem to get it to work.
Besides enabling the vertical scroll bar, what other steps do I need to take in order to utilize this feature?
View 4 Replies
View Related
Jan 27, 2012
I'm trying to use a non-modal userform as an application option board. Using API, the initial (Activate event) form transparency is set to 10%, and the Userform_MouseMove event turns it to 100%. The problem is that I need the transparency back to 10% (hiding it would be enough) whilst mouse remains outside the userform, and I've no idea of how I can get it.
View 5 Replies
View Related
Mar 3, 2014
I created the following worksheet when a user opens my workbook:
Project #Project DescProject LeaderStatus Date
1Project Desc 1Jones02/04/2014
2Project Desc 2Jones02/21/2014
5Project Desc 5Smith02/04/2014
[Code] ........
I now need to take the worksheet fields and place them in a userform which will have the following:
View command button which has the hyperlink attached to it followed by boxes with the Project Desc, Project Leader and Status Date.
View 2 Replies
View Related
Jan 9, 2007
I have a userform which has vertical and horizontal scroll bars. I want to set the scroll bar width and height properties to the correct value, regardless of the size of monitor screen used to look at the user form. I'm thought of using the code below in the initiliaze event for the user form:
Me.ScrollHeight = Me.Height
Me.ScrollWidth = Me.Width
However, this does not seem to work. I've tried adding 250 (Me.Height + 250)to each measurement, which works, but gives the user with the larger screen a very big scroll area. I wondered if there was a formula based on the application height, that would allow the scroll height to be perfect for the user form regardless of screen size?
Rico.
PS. I also use the following code to set the user form height on initialize. I don't know if that effects anything.
Me.Height = Application.Height
Me.Width = Application.Width
View 3 Replies
View Related
Dec 5, 2009
I have a User Form which i want to use in such a way that editing the worksheet directly is not disabled while the userform is running. I would also like to use the right button mouse menu(cut, cpy,paste) while i am using the user form. I am using two Monitors with my PC and i want to work with User Form on one monitor being able to edit worksheet without having to close my User Form.
View 2 Replies
View Related
Apr 19, 2013
Is there any way I can activate a sub routine when the user passes the mouse cursor over an activeX object.
For example this activates code when the user interacts with an activeX scroll bar:
VB:
Private Sub ScrollBar2_gotfocus()
Dim A, B, C
If OLEObjects("checkbox1").Object.Value = False Then
B = Range("B4").Value
A = (100 - B) / 2
C = (100 - B) / 2
End If
IS there a "gotfocus" equivalent such that code will run if the user simply passes their mouse cursor over the scroll bar EVEN IF they dont click it?
View 1 Replies
View Related
Dec 25, 2008
is there anyway to stop screen scroll?
so that you can only see the visible cells at opening of workbook?
View 14 Replies
View Related
Feb 13, 2009
I need some code to scroll the worksheet top-left.
View 2 Replies
View Related
Dec 8, 2009
When I make a comboBox selection from the dropdown menu, the menu stays down until the last statement of the comboBox code is finished. How do I make the dropdown disappear immediately after the selection is made?
View 9 Replies
View Related
Oct 1, 2009
I have one userform that loads combobox values upon userform Initialize. Though through a second userform changes can be made to anotherworkbook this workbook is saves any changes. when i close the second userform i need to rerun the 1st userform Initialize event to update the combobox's incase changes have been made.
View 5 Replies
View Related
Dec 2, 2009
I have a userform with a combobox that has three items to choose from: Blue, Red, and Yellow. When a user selects one of those options, I would like another combobox to appear on my userform with a specific list for that option.
View 2 Replies
View Related
Apr 9, 2012
I'm trying to make a userform that has 2 combo boxes. I have just 3 columns right now.
Procedure GrpADA-QSI DescProcedure GrpAnesthesia And
Drugs9210-LOCAL ANESTH/NO SURGAnesthesia And DrugsAnesthesia And
Drugs9212-TRIGEM BLOCK ANESTHCrowns And BridgeAnesthesia And
Drugs9215-LOCAL ANESTHESIADenturesAnesthesia And
[Code] ........
I copied and pasted Column A into Column C and then removed duplicates. I named Column C 'ValList' and placed it in the RowSource for ComboBox1. What I now want is for ComboBox2 to populate based on my selection in ComboBox1. There are no duplicates in Column B. Duplicates are in Column A.
I also named Column A 'Proc_Grp' and Column B 'ADA_QSI_Desc'
For the properties in Combobox2, I left the RowSource empty. (that's correct right?) Because there's going to be a code that links Combobox2 to Combobox1... I think...
View 6 Replies
View Related