Public sValue1 As String, sValue2 As String
Public dValue1 As Double, dValue2 As Double
Public vOper
vOper = "*" 'set operator
variable to "multiply"
sValue1 = txtMain1.Text 'get first string
value
sValue2 = txtMain2.Text 'get second string
value
dValue1 = CDbl(sValue1) 'convert first string
value to double
dValue2 = CDbl(sValue2) 'convert second string
value to double
dResult = (dValue1 & vOper & dValue2)
txtMain2.Text = CStr(dResult)
Public dValue1 As Double, dValue2 As Double
Public vOper
vOper = "*" 'set operator
variable to "multiply"
sValue1 = txtMain1.Text 'get first string
value
sValue2 = txtMain2.Text 'get second string
value
dValue1 = CDbl(sValue1) 'convert first string
value to double
dValue2 = CDbl(sValue2) 'convert second string
value to double
dResult = (dValue1 & vOper & dValue2)
txtMain2.Text = CStr(dResult)
Comment