Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() does anybody know of a site, book, or even person that know EXACTLY how a combo box works in Excel 2003 userforms? i've been looking everywhere and just about every source i've found either doesn't even give that control the time of day, or lies about what events get called when or what properties hold what. any help is appreciated, sven -- medicenpringles ------------------------------------------------------------------------ medicenpringles's Profile: http://www.excelforum.com/member.php...o&userid=16458 View this thread: http://www.excelforum.com/showthread...hreadid=492920 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perhaps describing the problem rather than just sounding off will help us to
help you. -- HTH RP (remove nothere from the email address if mailing direct) "medicenpringles" <medicenpringles.1zybhm_1134431701.879@excelforu m-nospam.com wrote in message news:medicenpringles.1zybhm_1134431701.879@excelfo rum-nospam.com... does anybody know of a site, book, or even person that know EXACTLY how a combo box works in Excel 2003 userforms? i've been looking everywhere and just about every source i've found either doesn't even give that control the time of day, or lies about what events get called when or what properties hold what. any help is appreciated, sven -- medicenpringles ------------------------------------------------------------------------ medicenpringles's Profile: http://www.excelforum.com/member.php...o&userid=16458 View this thread: http://www.excelforum.com/showthread...hreadid=492920 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
any help is appreciated,
What help do you expect when you're obviously sounding off rather than asking a question that can be answered effectively. Certainly XL/VBA Help doesn't lie, and there's extensive information there about comboboxes, their properties and methods, and it lists all the events that are fired. That doesn't mean there aren't bugs or that you're interpreting the information correctly, of course. What don't you understand? In article <medicenpringles.1zybhm_1134431701.879@excelforu m-nospam.com, medicenpringles <medicenpringles.1zybhm_1134431701.879@excelforu m-nospam.com wrote: does anybody know of a site, book, or even person that know EXACTLY how a combo box works in Excel 2003 userforms? i've been looking everywhere and just about every source i've found either doesn't even give that control the time of day, or lies about what events get called when or what properties hold what. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() what i have is a userform with a combo box, cmbSelectIngredient, and two text boxes, txtIngredientName and txtAmount. in the DropButtonClick event of the combo box i have this code: Code: -------------------- Private asIngredientNames(24) As String Private adIngredientAmounts(24) As Single Private Sub cmbSelectIngredient_DropButtonClick() If txtIngredientName.Text = "" Then Exit Sub Else asIngredientNames(cmbSelectIngredient.ListIndex) = CStr(txtIngredientName.Text) End If If txtAmount.Text = "" Then adIngredientAmounts(cmbSelectIngredient.ListIndex) = 0 Else adIngredientAmounts(cmbSelectIngredient.ListIndex) = CSng(txtAmount.Text) End If cmbSelectIngredient.AddItem "Ingredient " & cmbSelectIngredient.ListIndex + 1 End Sub -------------------- and in the Change event i have this code: Code: -------------------- Private Sub cmbSelectIngredient_Change() If asIngredientNames(cmbSelectIngredient.ListIndex) < "" Then If adIngredientAmounts(cmbSelectIngredient.ListIndex) = 0 Then GoTo Skip Else txtAmount.Text = adIngredientAmounts(cmbSelectIngredient.ListIndex) End If txtIngredientName.Text = asIngredientNames(cmbSelectIngredient.ListIndex) End If Skip: txtIngredientName.Text = "" txtAmount.Text = "" End Sub -------------------- and this as initialization: Code: -------------------- Private Sub UserForm_Initialize() cmbSelectIngredient.AddItem "Ingredient " & 1 cmbSelectIngredient.ListIndex = 0 End Sub -------------------- basically, what i try to achieve with this code is storing a string and a single into thier corresponding arrays, then when a previously stored ingredient is selected, i would like to fill the textboxes with the information previously stored in the array. but i'm getting all sorts of problems. mainly because i can't figure out how to recall the values into the textboxes. my code seems like it would do it, but since the ListIndex isn't changed until after the Change event it called, i think it may be impossible to do because i can't predict which line the user will select. maybe there's some way of finding out which line is selected before the Change event is called? -- medicenpringles ------------------------------------------------------------------------ medicenpringles's Profile: http://www.excelforum.com/member.php...o&userid=16458 View this thread: http://www.excelforum.com/showthread...hreadid=492920 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
the most frustrating control | Excel Programming | |||
Very Frustrating - Please Help! | Excel Worksheet Functions | |||
Frustrating Problem | New Users to Excel | |||
Simple but frustrating | Excel Programming | |||
Bizarre and frustrating bug | Excel Programming |