Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Strange format problem with textbox

I've found a strange format problem when I enter a value in a textbox
on a form.

If I enter value 5,5 in the textbox on the form, it is saved as value
5,5 in cell L14.
If I enter value 5.5 in the textbox on the form, it is saved as value
5,5 in cell L14.

The problem is that I can use the value in L14 in a sum function in the
second alternative, not in the first, although it looks like they are
saved as 5,5 in both cases.

This application is going to be used by people all over the world with
both decimal and dot separators so I have to find a generic solution
for both.

Can anyone help me with a solution?

// S

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Strange format problem with textbox

I don't have my system setup with comma as the decimal separator but I tried
to do it the other way and couldn't.

Couple of questions.

Are you seeing a number or text in that cell?

Can you post your code that does it?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
I've found a strange format problem when I enter a value in a textbox
on a form.

If I enter value 5,5 in the textbox on the form, it is saved as value
5,5 in cell L14.
If I enter value 5.5 in the textbox on the form, it is saved as value
5,5 in cell L14.

The problem is that I can use the value in L14 in a sum function in the
second alternative, not in the first, although it looks like they are
saved as 5,5 in both cases.

This application is going to be used by people all over the world with
both decimal and dot separators so I have to find a generic solution
for both.

Can anyone help me with a solution?

// S



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Strange format problem with textbox

Hi S

Just a suggestion:
why don't you replace any , with a . before you
save the value to the cell?

Hth

Carlo

" wrote:

I've found a strange format problem when I enter a value in a textbox
on a form.

If I enter value 5,5 in the textbox on the form, it is saved as value
5,5 in cell L14.
If I enter value 5.5 in the textbox on the form, it is saved as value
5,5 in cell L14.

The problem is that I can use the value in L14 in a sum function in the
second alternative, not in the first, although it looks like they are
saved as 5,5 in both cases.

This application is going to be used by people all over the world with
both decimal and dot separators so I have to find a generic solution
for both.

Can anyone help me with a solution?

// S


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Strange format problem with textbox

Hello,

I'm using this code and I see the number:

Range("O" & (lngSelectedObjective + 14)).Value = txtValue.Text

Can I really trust that it will work on all machines with . if I
replace it?

// S


Carlo skrev:

Hi S

Just a suggestion:
why don't you replace any , with a . before you
save the value to the cell?

Hth

Carlo

" wrote:

I've found a strange format problem when I enter a value in a textbox
on a form.

If I enter value 5,5 in the textbox on the form, it is saved as value
5,5 in cell L14.
If I enter value 5.5 in the textbox on the form, it is saved as value
5,5 in cell L14.

The problem is that I can use the value in L14 in a sum function in the
second alternative, not in the first, although it looks like they are
saved as 5,5 in both cases.

This application is going to be used by people all over the world with
both decimal and dot separators so I have to find a generic solution
for both.

Can anyone help me with a solution?

// S



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
strange problem -Bryan[_2_] Excel Discussion (Misc queries) 3 May 1st 08 06:56 PM
TextBox Format/Editing Problem henryhbb Excel Programming 1 May 26th 05 11:02 PM
VBA & API - Strange problem using Philip Excel Programming 0 May 11th 05 09:30 AM
Strange Format changes Dan Wilson Excel Worksheet Functions 5 March 15th 05 02:49 AM
Strange problem Stuart[_8_] Excel Programming 1 October 3rd 03 12:14 AM


All times are GMT +1. The time now is 07:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"