I`ve done all the work and the numbers appear in the textbox, but when I press equl it does not give the result!

Protected Sub EqlBtn_Click(ByVal sender As Object, ByVal e As EventArgs) Handles EqlBtn.Click
        If txtentr.Text.Length > 0 Then
            Select Case Vals
                Case 1 ' 
                    txtentr.Text = Store / Val(txtentr.Text)
                Case 2
                    txtentr.Text = Val(txtentr.Text) * Store
                Case 3
                    txtentr.Text = Store - Val(txtentr.Text)
                Case 4
                    txtentr.Text = Val(txtentr.Text) + Store
            End Select

            txtentr.Text = String.Empty
        End If

        'store is the first number entered.

where is the problem here ?

Recommended Answers

All 2 Replies

You have references to 'Store' and 'Val'. Are you sure that these variables have been initiated properly and they have values?

yes, :)

I solved the problem by using if statments and instead these 2 varialbes I used textbox and label and solved it :)


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.