Hi,I am trying to use Ccur function to convert a string, but I got Type Mismatch error.
Basically, I have a currency in French format as 2089,98
Now, I want to convert it to English Format as 2089.98
In order to simulate my machine as French machine, I changed the Data format of my local machine to French(Canada).
So I am using these codes:
I got that error when execuate this code:
convnum=Ccur(bigstr)
Print “before convert:” + Cstr(FreNum)
Dim str1 As String
Dim str2 As String
Dim bigstr As String
Dim convnum As Currency
str1=Strleft(Cstr(FreNum),",")
Print "str1:" + str1
str2=Strright(Cstr(FreNum),",")
Print "str2:" + str2
bigstr=str1+"." + str2
Print "bigstr:" + bigstr
convnum=Ccur(Cdbl(bigstr)) -- popup Type Mismatch error.
Basically, from the design help, to make it simple.
I created a button with this simple code:
dim pricestr as string
dim realprice as currency
pricestr=“12.99”
realprice=ccur(pricestr) ’ got Type mismatch error in French(Canada) setup.
But I do not have that problem if I change the setup to English(Canada) setup in my local machine. the realprice coverted properly,
Any ideas?