ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Issue with European Versions and VBA (https://www.excelbanter.com/excel-programming/324032-issue-european-versions-vba.html)

Bill[_30_]

Issue with European Versions and VBA
 
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



Tom Ogilvy

Issue with European Versions and VBA
 
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.

--
Regards,
Tom Ogilvy

"Bill" wrote in message
hlink.net...
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






All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com