Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
It's not just the Me. that's important. It's the qualified objects that make
the debugging easier. Glad you got it working. pallaver wrote: I think I understand what the "Me." does, just not sure how that helps with debugging in the future. Regardless though, every part of my original question has been answered, I updated the original excel spreadsheet and just tested it and it works. I've received already some impressives oohs and pats on the back, and I'm humbled to say you answered in one day what I couldn't find online in one week. How morally leveling. Thanks. On 6$B7n(B27$BF|(B, $B8aA0(B10:56, Dave Peterson wrote: Me is a reserved word in VBA. It refers to the thing that owns the code. In this case, it refers to the userform that owns the code (and that combobox). I like to qualify my objects (like ranges and comboboxes). It doesn't hurt to qualify them and sometimes can make debugging much, much easier. === This is from xl2003's VBA's help: MatchEntry Property Returns or sets a value indicating how a ListBox or ComboBox searches its list as the user types. ... Settings The settings for fmMatchEntry a fmMatchEntryFirstLetter: Basic matching. The control searches for the next entry that starts with the character entered. Repeatedly typing the same letter cycles through all entries beginning with that letter. FmMatchEntryComplete: Extended matching. As each character is typed, the control searches for an entry matching all characters entered (default). FmMatchEntryNone: No matching. pallaver wrote: Couple of questions though for my further understanding: 1. I noticed you had put in "Me." in front of cboDirect, yet the program works without the "Me." Why did you put the "Me." in? Does it help with bugs or something? 2. What does this line accomplish: " .MatchEntry = fmMatchEntryComplete " Thanks, Neil Option Explicit Private Sub UserForm_Initialize() Dim i As Long Dim RowWorkMin As Long RowWorkMin = 77 With Me.cboDirect .RowSource = "" .Style = fmStyleDropDownList .MatchEntry = fmMatchEntryComplete For i = RowWorkMin To 88 Me.cboDirect.AddItem i Next i End With End Sub If you want to allow the user to type an entry that isn't on the dropdown list, you can change the .style to fmStyleDropDownCombo. (I'm kind of confused about what you wanted.) -- Dave Peterson- $B0zMQ%F%-%9%H$rI=<($7$J$$(B - - $B0zMQ%F%-%9%H$rI=<((B - -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Populating a Data Validation List | Excel Discussion (Misc queries) | |||
formatting the list items for ComboBox created using Forms | Excel Discussion (Misc queries) | |||
Populating worksheet via a drop down list ! | Excel Worksheet Functions | |||
populating a list box with weekly dates | Excel Worksheet Functions | |||
additem to combobox with an array | Excel Discussion (Misc queries) |