answersLogoWhite

0

Option Explicit

Dim firstnum As Single

Dim answer As Single

Dim calculate As Integer

Dim Readout As Integer

Dim DecimalFlag As Integer

Dim NumOps As Integer

Dim LastInput

Dim OpFlag

Private Sub btnadd_Click()

calculate = 1

firstnum = Val(txtcalc)

txtcalc = ""

End Sub

Private Sub btnbackspace_Click()

txtcalc = Left(txtcalc, Len(txtcalc) - 1)

End Sub

Private Sub btnC_Click()

txtcalc = ""

txtcalc = Format(0, "0.")

End Sub

Private Sub btndiv_Click()

calculate = 4

firstnum = Val(txtcalc)

txtcalc = ""

End Sub

Private Sub btndot_Click()

txtcalc = txtcalc + "."

End Sub

Private Sub btnequal_Click()

Dim secondnum As Single

secondnum = Val(txtcalc)

Select Case calculate

Case Is = 1

answer = firstnum + secondnum

Case Is = 2

answer = firstnum - secondnum

Case Is = 3

answer = firstnum * secondnum

Case Is = 4

answer = firstnum / secondnum

End Select

txtcalc = answer

End Sub

Private Sub btnmul_Click()

calculate = 3

firstnum = Val(txtcalc)

txtcalc = ""

End Sub

Private Sub btnpress0_Click()

txtcalc = txtcalc + "0"

End Sub

Private Sub btnpress1_Click()

txtcalc = txtcalc + "1"

End Sub

Private Sub btnpress2_Click()

txtcalc = txtcalc + "2"

End Sub

Private Sub btnpress3_Click()

txtcalc = txtcalc + "3"

End Sub

Private Sub btnpress4_Click()

txtcalc = txtcalc + "4"

End Sub

Private Sub btnpress5_Click()

txtcalc = txtcalc + "5"

End Sub

Private Sub btnpress6_Click()

txtcalc = txtcalc + "6"

End Sub

Private Sub btnpress7_Click()

txtcalc = txtcalc + "7"

End Sub

Private Sub btnpress8_Click()

txtcalc = txtcalc + "8"

End Sub

Private Sub btnpress9_Click()

txtcalc = txtcalc + "9"

End Sub

Private Sub btnsquare_Click()

txtcalc = txtcalc ^ (1 / 2)

End Sub

Private Sub btnsub_Click()

calculate = 2

firstnum = Val(txtcalc)

txtcalc = ""

End Sub

Private Sub Form_Load()

DecimalFlag = False

txtcalc = Format(0, "0.")

End Sub

Private Sub txtcalc_Change()

Dim numval As String

If IsNumeric(txtcalc) Then

Else

txtcalc.Text = CStr(numval)

End If

End Sub

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the source code for scientific calculator in c?

What is the source code for scientific calculator in c?Read more: What_is_the_source_code_for_scientific_calculator_in_c


Can you provide a link to the GitHub repository where I can cite the source code for this project?

You can find the source code for this project on the GitHub repository at insert link here.


From where you can download free Software Project Source Code Documentation?

There are sites on internet from where you can download Software Project Source Code Documentation for free. You can also buy a CD for the software.


How you can get lic premium calculator source code?

Dont KNow bro


Source code for calculator in vb 6.0?

high level language


Software project based on dot-net with source code and documentation?

display the question can you provide c# with .net project with complete documentation and source code?


How calculator create in assembly language in tasm source code?

I dont know it.


Website of free java project to be download with source code?

which Website for free java project to be download with source code Free Download Project in asp.net,Java ,C#.Net ,Php on thisWebsite www.enggroom.com


'How can get free source code for website project?

There are lot of websites listing free source code. Like www.aspin.com, www.sourceforge.net and so on.


Can you provide me with a link to the GitHub repository where I can cite the source code for this project?

You can find the source code for this project on the GitHub repository at the following link: GitHub Repository Link(insert link here)


Source code of text editor with compiler?

Check out open source sites, such as FreshMeat or SourceForge, or the GNU project.


How do you solve bugs in struts framework in java?

Struts is an open source framework that is created/marketed by the Jakarta commons project. It is an open source and so you can also get the source code of the struts framework. If you feel the code has any issues, then you can fix them in your code, test them and contact the Jakarta commons project and have the fix implemented.