|
-
Nov 19th, 2007, 06:04 PM
#1
Thread Starter
New Member
VB 6 strComp() Help!
I'm just learning VB 6 and I don't know what is wrong, it's working, but not for all values I put in (e.g."tt" or "rr") Thank you
Option Explicit
Private Sub calcFee_Click()
Dim intRez, intMsg As Integer
intRez = 1
Dim strCode As String
Const conButton As String = vbOKOnly + vbInformation + vbDefaultButton1 + vbApplicationModal
strCode = txtCode.Text
Select Case intRez
Case Is = StrComp(strCode, "TC", vbTextCompare)
lblFee.Caption = "The fee is " & "$" & 50
Case Is = StrComp(strCode, "RV", vbTextCompare)
lblFee.Caption = "the fee is " & "$" & 15
Case Is = StrComp(strCode, "OS", vbTextCompare)
lblFee.Caption = "the fee is " & "$" & 5
Case Else
intMsg = MsgBox("Invalid Entry! Try again!", conButton, "List Procedure")
txtCode.SetFocus
txtCode.SelStart = 0
txtCode.SelLength = 2
End Select
End Sub
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
|