Issue with European Versions and VBA

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hello,
I have a small program that associates have been trying to use in Germany.
Part of it is a text box where they enter a number (like 1.5, 20, etc.) The
decimals don't work right. They have tried chaning their settings, etc.

Any ideas?

Thanks.

Bill
 
I suspect they are entering 1,5 for 1.5. If so, you would need something
like

Dim sStr as String
Dim dblNum as Double
sStr = Textbox1.Text
dblNum = cDbl(sStr)

cDbl will convert it to a double and will respect their regional settings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top