Hi,
I am pulling text from a file (csv export from a shopping cart) in string format, some of this text naturally represents numbers. I'm having problems assigning these strings as numbers to a new variable, originally defined as a variant. Here is the line along with my variable declarations:
Dim order_total
Dim hold_values() As String
order_total = FormatNumber(order_total, 2, , , vbFalse) + FormatNumber(hold_values(i), 2, , , vbFalse) * FormatNumber(hold_values(i + 1), 2, , , vbFalse) 'The running total order amount
What should I do with the declarations of the variables, or am I using the wrong formatting here?
I want to work with numbers formatted to 2 d.p.'s along the way (I need to round separately for each value, since the accounting package import procedure works with the separate values this way in order to balance).
I am pulling text from a file (csv export from a shopping cart) in string format, some of this text naturally represents numbers. I'm having problems assigning these strings as numbers to a new variable, originally defined as a variant. Here is the line along with my variable declarations:
Dim order_total
Dim hold_values() As String
order_total = FormatNumber(order_total, 2, , , vbFalse) + FormatNumber(hold_values(i), 2, , , vbFalse) * FormatNumber(hold_values(i + 1), 2, , , vbFalse) 'The running total order amount
What should I do with the declarations of the variables, or am I using the wrong formatting here?
I want to work with numbers formatted to 2 d.p.'s along the way (I need to round separately for each value, since the accounting package import procedure works with the separate values this way in order to balance).