2
Contributors
10
Replies
11
Views
6 Years
Discussion Span
Last Post by AndreRet
0

Try the following -

If Combo1.Text = "Product" Or Combo1.Text = "Size" Then
MaskedEit1.Enabled = False
End If

Do this under your combo_click event.

Edited by AndreRet: n/a

0

Yes, it works but it makes all items disable like the Cost as well. Here my codes:

If cboType.Text = "Product" Or cboType.Text = "Size" Then
mtxtCategory.Enabled = False
End If

0

Try the following -

If Combo1.Text = "Product" Or Combo1.Text = "Size" Then
MaskedEit1.Enabled = False
End If

Do this under your combo_click event.

Yes, it works but it makes all items disable like the Cost as well. Here my codes:

If cboType.Text = "Product" Or cboType.Text = "Size" Then
mtxtCategory.Enabled = False
End If

0

Then try and change the If to a select statement -

Private Sub cboType_Click()
Select Case cboType.Text

Case Is = "Cost"
mtxtCategory.Enabled = True

Case Is = "Product"
mtxtCategory.Enabled = False

End Select
End Sub
0

Yes now its good, it works LOL, THANK YOU THANK YOU VERY MUCH YOU ARE GREAT...THANK YOU!

0

It's a pleasure, please mark this as solved, found at the bottom of this page, thanks.:)

Happy coding;)

0

By the way, do you know how to create a search box in Visual Basic? I want the search box based on streamreader. In proper terms, when I will input a text, it has to read on a text file in drice C. I know the streamreader code but don't know the code to do a search.

0

Yes you can, but it is off topic in this thread.:)

Please open a new thread, I'll answer from there, thanks.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.