calculating two strings

  • Thread starter Thread starter sirron
  • Start date Start date
S

sirron

I have a string that contains a number 10
and another string that contains a number 5
I want to add these together to get
a number 15
Does anyone know how this is done?

thanks sirron
 
Dim lngTotal as Long
Dim str1 as String, str2 as String
str1 = 10
str2 = 5
lngtotal = clng(str1) + clng(str2)
msgbox lngTotal
 
Back
Top