Results 1 to 3 of 3

Thread: code problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    23

    Question

    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

  2. #2
    Guest
    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,

  3. #3
    Hyperactive Member theman32x's Avatar
    Join Date
    May 2000
    Location
    New Jersey, USA
    Posts
    305
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width