-
In the MSDN files, it says that you can convert a string to an integer if the string is in an integer format. Here is what it says you can do:
Code:
strprice = "100.00"
intprice = strprice
This code works, but I need something different. What I need to do is something more like this:
Code:
For i = 0 to 5
strprice = MSHFlexgrid.TextMatrix(i, 4)
intprice = strprice
Next i
However, when I do that, it gives me an error because the datatypes are different. What can I do to fix this problem?
------------------
Ryan
-
Why don't you just convert it into an integer the good ol' fashioned way (Cint(String Expression)) and then use the format function to convert it to whatever (in this case, Format(Cint(String Expression), "####0.00").
-
ACTUALLY the 'good 'ol fashion way' would be simply this:
Val(String)
Simple ain't it!
And a integer to a string?
Str(Integer)
Just as simple!
------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.
-
Thanks, it works great now!
------------------
Ryan