Vous êtes sur la page 1sur 1

Códigos de macros en orden:

Botones numéricos: txtresultado.Text=txtresultado.Text + "1" (y así sucesivamente


1,2,3 etc).

Botones de operaciones: x = txtresultado.Text operacion = "suma, resta,


multiplicacion, division" (cual sea el botón). txtresultado.Text = 'doble comillas
juntas

Botón igual: y = txtresultado.Text if operacion = "suma" then txtresultado.Text =


CInt (x) + CInt (y). If operacion = "resta" then txtresultado.Text = CInt (x) -
CInt (y). if operacion = "multiplicacion" then txtresultado.Text = CInt (x) * CInt
(y). if operacion = "division" then txtresultado.Text = CInt (x) / CInt (y).

Botón end: end Hasta arriba de la hoja de comandos: Dim x, y As Single Dim
operacion As String

Vous aimerez peut-être aussi