M
Michael J. Malinsky
I have a function that grabs a number from a mysql database. To return the
number, I use:
GetMySql = myrs.Fields(lString).Value
and the result in the spreadsheet is returned as, for example, 3980 and is
left justified as if it were a string.
If I try
GetMySql = Format(myrs.Fields(lString).Value, "#,##0")
the result is 3,980 and is still left justified.
then i tried
GetMySql = CCur(myrs.Fields(lString).Value)
and now it's right justified, but it shows as 3980.
So how can I get the number returned as a number type format with a comma
and make it right justified?
Seems simple, but I'm beating my head against the keyboard.
TIA
Mike
number, I use:
GetMySql = myrs.Fields(lString).Value
and the result in the spreadsheet is returned as, for example, 3980 and is
left justified as if it were a string.
If I try
GetMySql = Format(myrs.Fields(lString).Value, "#,##0")
the result is 3,980 and is still left justified.
then i tried
GetMySql = CCur(myrs.Fields(lString).Value)
and now it's right justified, but it shows as 3980.
So how can I get the number returned as a number type format with a comma
and make it right justified?
Seems simple, but I'm beating my head against the keyboard.
TIA
Mike