Thread
:
Need help realy badly
View Single Post
Need help realy badly
Reply
Posted 2006-02-15, 02:54 PM
I hate vb i got this homework i don't know what to do with it. I need to change my code to what the teacher said. here is the code
Dim bValid As Boolean
Dim iFirst As Integer, iSecond As Integer, iResult As Integer
bValid = False
iResult = 0
If txtFirst = vbNullString Then
MsgBox "Value required in first text box.", vbExclamation, "Missing First Value"
txtFirst.SetFocus
ElseIf txtSecond = vbNullString Then
MsgBox "Value required in second text box.", vbExclamation, "Missing Second Value"
txtSecond.SetFocus
Else
bValid = True
iFirst = CInt(txtFirst.Text)
iSecond = CInt(txtSecond.Text)
End If
If bValid = True Then
iResult = iFirst + iSecond
txtResult = CStr(iResult)
End If
End Sub
Private Sub cmdExit_Click()
Dim vbanswer As VbMsgBoxResult
vbanswer = MsgBox("are you sure", vbYesNo, " Exit")
If vbanswer = vbYes Then
End
End If
End Sub
his question is
Create a procedure that replace the entry validation procedure.
Create a procedure that replaces the addition and subtraction operations
Create a function that replaces the multiplication and division operations
i don't know what hey said need help badly. Thank visual basic sux
Profile
PM
WWW
Search
osmoses-jones