View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Duncan[_5_] Duncan[_5_] is offline
external usenet poster
 
Posts: 290
Default Textbox calculation problem...

Try the format option first, but I dont think that is the problem
having tested your code, there must be something else that is setting
the format of the textbox....

I am not sure but is there something in the textbox properties that is
dictating the format?, or is it how the value is passed?

Try my line of code replacing yours but post back and let us know
because I am not sure if that will solve it for you (I cannot get 55.55
/ 3 to equal 1851.6667 on my test so it must be something else that
your form is doing, the format might solve it but that is not the cause
only the symptom)

Post back and let us know

Duncan


pmguerra wrote:

Hi again...

I have a little textbox problem. The code (simplified) is the
following:

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)

'divide the textbox value by 3
TextBox1.Value = TextBox1.Value / 3

End Sub

when I insert "55", I get 18.333. No problem here.

If I insert "55.55", I get 1851.6667!!!!!!!!!!!!!!! I believe this is a
dot or comma related problem...

Any help, please???


--
pmguerra
------------------------------------------------------------------------
pmguerra's Profile: http://www.excelforum.com/member.php...o&userid=14986
View this thread: http://www.excelforum.com/showthread...hreadid=561409