|
-
Jul 20th, 2000, 09:42 AM
#1
Thread Starter
Fanatic Member
Howdy,
I have a dropdown combo box and two option buttons and one
list box.
I want the list box to show the dropdown combo box selection and concatenate the option button choice.
I am having trouble with the correct syntax.
if I do something like :
____________________
Private Sub cmdCalculate_Click()
If optFour.Value = True Then
intNumOne = 4
End If
lstHistory.AddItem cboShows.Text & intNumOne
End Sub
_____________________
the cboShows.text shows up in my list box but the
number that should be a four is a zero.
If I change the intNumOne to a 4 like this
lstHistory.AddItem cboShows.Text & 4
then the four shows up.
so I know it is possible but like I said I have the wrong syntax
thanks to anyone who helps
-
Jul 20th, 2000, 09:57 AM
#2
I'm somewhat confused, but nevertheless, try this and see if it's want you want.
Code:
'Add whatever is in the ComboBox to the ListBox
List1.AddItem Combo1.Text
'If the text is "10" then Option1 is selected, otherwise, Option2 is selected
If Combo1.Text = "10" Then Option1.Value = True Else Option2.Value = True
-
Jul 20th, 2000, 10:11 AM
#3
Addicted Member
Are you sure you are getting the 4 into intNumOne? and not changing it anywhere to 0?
Can you not get whats in the CombBox as a string then add the Integer like this?
'Build String.
strMyString = cboShows.Text & CStr(intNumOne )
'Add String to List.
lstHistory.AddItem strMyString
-
Jul 20th, 2000, 11:35 AM
#4
Thread Starter
Fanatic Member
i'm a moron..sorry :)
Opps....
I had my option buttons named incorrectly.
sorry for the confusion.
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
|