I am a beginner and am trying to make a calculator, i need some help with the BuildNumber, could someone show me how I can use this method to add the button clicked to the string please.
ThanksCode:Private Sub BuildNumber(Number As String) 'Adds a number to the expression string End Sub Private Sub cmd0_Click() 'add number to string Call BuildNumber("0") txtOutput.Text = "0" End Sub Private Sub cmd1_Click() 'add number to string Call BuildNumber("1") txtOutput.Text = "1" End Sub Private Sub cmd2_Click() 'add number to string Call BuildNumber("2") txtOutput.Text = "2" End Sub Private Sub cmd3_Click() 'add number to string Call BuildNumber("3") txtOutput.Text = "3" End Sub Private Sub cmd4_Click() 'add number to string Call BuildNumber("4") txtOutput.Text = "4" End Sub Private Sub cmd5_Click() 'add number to string Call BuildNumber("5") txtOutput.Text = "5" End Sub Private Sub cmd6_Click() 'add number to string Call BuildNumber("6") txtOutput.Text = "6" End Sub Private Sub cmd7_Click() 'add number to string Call BuildNumber("7") txtOutput.Text = "7" End Sub Private Sub cmd8_Click() 'add number to string Call BuildNumber("8") txtOutput.Text = "8" End Sub Private Sub cmd9_Click() 'add number to string Call BuildNumber("9") txtOutput.Text = "9" End Sub
Anarchist




Reply With Quote