|
-
Jun 3rd, 2005, 01:54 PM
#1
Thread Starter
Hyperactive Member
Combo Box {RESOLVED}
I want to set a value to flgElim 0 or 1 depends on which item is selected in the combo box, cmbElim
VB Code:
Option Explicit
Public flgElim As Boolean
Private Sub cmbElim_Change()
If cmbElim.ListIndex = "0" Then
flgElim = "0"
ElseIf cmbElim.ListIndex = "1" Then
flgElim = "1"
End If
End Sub
This is what I have now and it doesn't work.. I've also tried using cmbElim.Index but I dunno what else to try
Last edited by ooOOJaVaOOoo; Jun 3rd, 2005 at 02:00 PM.
-
Jun 3rd, 2005, 01:55 PM
#2
Re: Combo Box
Try moving your code from the Change even to the Click event. You aren't selecting anything from the Change event.
-
Jun 3rd, 2005, 01:57 PM
#3
Addicted Member
Re: Combo Box
since flgElim is declared as a boolean, all you have to do is enter 'flgElim = True' or 'flgElim = False'. You are doing right using the ListIndex but I dont think you need the quotes around it.
-
Jun 3rd, 2005, 02:00 PM
#4
Thread Starter
Hyperactive Member
Re: Combo Box
Thanks for the quick responses! Took both of yer replies and it works
-
Jun 3rd, 2005, 02:09 PM
#5
Addicted Member
Re: Combo Box {RESOLVED}
heh, np. I was in you position just a few months ago....this is a great community and youll learn so much here and soon you will be helping others out as well =) .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|