Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Converting string to currency

Hello,
I am converting a datagridview value to currency

    If IsDBNull(sender.Rows(intRowIndex).Cells("Deposite").Value) = False Then
                str_Dep = CDbl(sender.Rows(intRowIndex).Cells("Deposite").Value)
            End If

Open in new window

but,the problem with the above code is that it converts
21.10 to 21.1 whereas the requirement is to convert it to 21.10
Any suggestions are welcome.

Cheers
SOLUTION
Avatar of p_davis
p_davis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Working great p_davis but, it puts £ sign in front of the value.
Any suggestion ?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of p_davis
p_davis

i think saige is correct in suggesting the use of N... sorry, of course, i assumed somethingn i shouldn't have.
Avatar of RIAS

ASKER

Thanks Saige!!!
doesn't anyone believe in splitting points anymore?
Avatar of RIAS

ASKER

p_davis,
Sorry mate but,yours can be an assisted solution .Raising it.
just appreciate a nod for the effort
Avatar of RIAS

ASKER

P_davis,

Was operating the solution from phone.Just accepted the solution in hurry.
Thanks once again.
Avatar of RIAS

ASKER

Cheers!