You are on page 1of 2

Private Dim Dim a = b =

Sub cmdSaberi_Click() a As Double b As Double Val(Text1.Text) Val(Text2.Text)

Text1.Text = a Text2.Text = b Text3.Text = a + b End Sub Private Dim Dim a = b = Sub Command1_Click() a As Double b As Double Val(Text1.Text) Val(Text2.Text)

Text1.Text = a Text2.Text = b Text3.Text = a - b End Sub Private Dim Dim a = b = Sub Command2_Click() a As Double b As Double Val(Text1.Text) Val(Text2.Text)

Text1.Text = a Text2.Text = b Text3.Text = a * b End Sub Private Sub Command3_Click() Dim a As Double Dim b As Double a = Val(Text1.Text) b = Val(Text2.Text) Text1.Text = a Text2.Text = b If b = 0 Then Text3.Text = "nedifinisano" Else Text3.Text = a / b End If End Sub Private Sub Command4_Click() Unload Me End Sub

Private Sub Form_unload(cancel As Integer) If MsgBox("dali zelite da izadete iz programa", vbYesNo, "pitanje") = vbNo Then cancel = 1 End If End Sub

You might also like