excel practical

Dim a As Double

Dim b As Double

Dim c As Double


Dim op As Double

 

Private Sub CommandButton1_Click()

TextBox1.Text = TextBox1.Text + "1"

End Sub

 

Private Sub CommandButton10_Click()

TextBox1.Text = TextBox1.Text + "00"

End Sub

 

Private Sub CommandButton11_Click()

TextBox1.Text = TextBox1.Text + "0"

End Sub

 

Private Sub CommandButton12_Click()

b = TextBox1.Text

Call operaciones

End Sub

 

Private Sub CommandButton13_Click()

op = 1

a = TextBox1.Text

TextBox1.Text = ""

End Sub

 

Private Sub CommandButton14_Click()

op = 2

a = TextBox1.Text

TextBox1.Text = ""

End Sub

 

Private Sub CommandButton15_Click()

op = 3

a = TextBox1.Text

TextBox1.Text = ""

End Sub

 

Private Sub CommandButton16_Click()

op = 4

a = TextBox1.Text

TextBox1.Text = ""

End Sub

 

Private Sub CommandButton17_Click()

TextBox1.Text = ""

End Sub

 

Private Sub CommandButton2_Click()

TextBox1.Text = TextBox1.Text + "2"

End Sub

 

Private Sub CommandButton3_Click()

TextBox1.Text = TextBox1.Text + "3"

End Sub

 

Private Sub CommandButton4_Click()

TextBox1.Text = TextBox1.Text + "4"

End Sub

 

Private Sub CommandButton5_Click()

TextBox1.Text = TextBox1.Text + "5"

End Sub

 

Private Sub CommandButton6_Click()

TextBox1.Text = TextBox1.Text + "6"

End Sub

 

Private Sub CommandButton7_Click()

TextBox1.Text = TextBox1.Text + "7"

End Sub

 


Private Sub CommandButton8_Click()

TextBox1.Text = TextBox1.Text + "8"

End Sub

 

Private Sub CommandButton9_Click()

TextBox1.Text = TextBox1.Text + "9"

End Sub

 

Private Sub operaciones ()

If op = 1 Then

c = a + b

TextBox1.Text = c

End If

 

If op = 2 Then

c = a - b

TextBox1.Text = c

End If

 

If op = 3 Then

c = a * b

TextBox1.Text = c

End If

 

If op = 4 Then

c = a / b

TextBox1.Text = c

End If

 End Sub





Private Sub CommandButton1_Click()
TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
End Sub

Private Sub CommandButton2_Click()
TextBox3.Text = Val(TextBox1.Text) - Val(TextBox2.Text)
End Sub

Private Sub CommandButton3_Click()
TextBox3.Text = Val(TextBox1.Text) * Val(TextBox2.Text)
End Sub

Private Sub CommandButton4_Click()
TextBox3.Text = Val(TextBox1.Text) / Val(TextBox2.Text)
End Sub

Private Sub CommandButton5_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub


Post a Comment

22Comments

Please don't spam comments Thank You.

  1. This content is really unique and amazing. This article really helpful and explained very well.

    Learn MIS Training Core to Advanced Level

    ReplyDelete
  2. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well.

    Get Learn AutoCAD Training with 20% Off

    ReplyDelete
  3. Excellent post. I was always checking this blog, and I’m impressed! Extremely useful info specially the last part, I care for such information a lot about Addon domain.

    Best Training Institute for SQL Server Training

    ReplyDelete
  4. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
  5. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
  6. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
  7. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
  8. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
  9. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
  10. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
  11. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
  12. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
  13. This comment has been removed by a blog administrator.

    ReplyDelete
  14. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
  15. Your content is very useful for increasing knowledge in computer and other sectors
    So thank you so much sir ji 👏👏👏👏

    ReplyDelete
Post a Comment