ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Decimal problems (https://www.excelbanter.com/excel-programming/380637-re-decimal-problems.html)

Niek Otten

Decimal problems
 
What error do you get?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"excelent" wrote in message ...
| This kode works fine when i put integer numbers like 1 or 11 or 13
| in column G, but if i put 1,1 or 1,11 or 12,2 it return an error why ?
| (Excell 2003 DK) by the way input like 1.1 (1 dot 1) is text in DK way
|
| Private Sub Worksheet_Change(ByVal Target As Range)
| If Intersect(Target, Range("G:G")) Is Nothing Then Exit Sub
| If IsNumeric(Target) Then Target = "=" & Target
| End Sub
|



Niek Otten

Decimal problems
 
If I set my decimal separator to comma, it works fine for me. That is, I don't get an error. I don't see what you're trying to do,
though.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"excelent" wrote in message ...
| run-time error 1004
| Application-defined or Object-defined error
|
|
| "Niek Otten" skrev:
|
| What error do you get?
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "excelent" wrote in message ...
| | This kode works fine when i put integer numbers like 1 or 11 or 13
| | in column G, but if i put 1,1 or 1,11 or 12,2 it return an error why ?
| | (Excell 2003 DK) by the way input like 1.1 (1 dot 1) is text in DK way
| |
| | Private Sub Worksheet_Change(ByVal Target As Range)
| | If Intersect(Target, Range("G:G")) Is Nothing Then Exit Sub
| | If IsNumeric(Target) Then Target = "=" & Target
| | End Sub
| |
|
|
|



Niek Otten

Decimal problems
 
That was when I set it in Excel. But if I set it to comma in Windows (Control Panel) I do get the same error as you get.
Some international settings don't get through to VBA; I knew about dates, but it looks like this is another one.
I don't know of any remedy, apart from (temporarily) change your system settings.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Niek Otten" wrote in message ...
| If I set my decimal separator to comma, it works fine for me. That is, I don't get an error. I don't see what you're trying to
do,
| though.
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "excelent" wrote in message ...
|| run-time error 1004
|| Application-defined or Object-defined error
||
||
|| "Niek Otten" skrev:
||
|| What error do you get?
||
|| --
|| Kind regards,
||
|| Niek Otten
|| Microsoft MVP - Excel
||
|| "excelent" wrote in message ...
|| | This kode works fine when i put integer numbers like 1 or 11 or 13
|| | in column G, but if i put 1,1 or 1,11 or 12,2 it return an error why ?
|| | (Excell 2003 DK) by the way input like 1.1 (1 dot 1) is text in DK way
|| |
|| | Private Sub Worksheet_Change(ByVal Target As Range)
|| | If Intersect(Target, Range("G:G")) Is Nothing Then Exit Sub
|| | If IsNumeric(Target) Then Target = "=" & Target
|| | End Sub
|| |
||
||
||
|
|




All times are GMT +1. The time now is 09:48 AM.

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