View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Textbox calculation problem...

Do you have some formatting occur in one of the TextBox events ?
Does this work ?

TextBox1.Text= CSng(TextBox1.Text) / 3

NickHK

"pmguerra" wrote in
message ...

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