Format Function

  • Thread starter Thread starter cmdolcet69
  • Start date Start date
C

cmdolcet69

THe following code is suppose to format the
_ReadingsArraylistValidated as 0.10, 0.09,.....and so on..however when
I look in my excel spreadsheet it comes over as ##0.00....what did I
miss?



For intInnerloop = 0 To _partfile.gageList.Count - 1
' oWS.Cells(intRowLoc, intColLoc) = 1
'oWS.Cells(intRowLoc, intColLoc) =
CStr(_ReadingsArraylistValidated(intInnerloop))
oWS.Cells(intRowLoc, intColLoc) =
Format(_ReadingsArraylistValidated(intInnerloop), "##0.00")

intColLoc += 1
If intColLoc = 256 Then
intRowLoc += 1
intColLoc = 3
End If
Next
 
Are you sure that _ReadingsArraylistValidated contains only numbers? I get
the bahaviour you see when I feed a string to that format pattern.
 
To clarify, the string I passed is a non-numeric string, such as "Hello
world...".
 
Back
Top