-
Hi everyone
having a bit of bother with the following code
text7 is not visible regardless of which button is clicked
can anyone tell me where i'm going wrong
Thanks!
If Int(Val(Text1.Text - Val(sawcut * Val(tubpieces)))) > 50 Then
MsgBox "Do you want to use the remaing piece?", vbQuestion + vbYesNo
If vbYes Then
Text7.Visible = True
End If
If vbNo Then
Text7.Visible = False
End If
End If
p.s 'else' gives the same result
-
Code:
Dim RetVal As Integer
If Int(Val(Text1.Text) - Val(sawcut * Val(tubpieces))) > 50 Then
RetVal = MsgBox "Do you want to use the remaing piece?", vbQuestion + vbYesNo
If RetVal Then
Text7.Visible = True
Else
Text7.Visible = False
End If
Hope this helps,
-
yeah in order for you to find out if a certain button was clicked on a message box you have to assign it to a variable like the Merry did