Results 1 to 4 of 4

Thread: decimal points

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Location
    Sydney
    Posts
    107

    decimal points

    Hi everyone,
    i created 10 textboxes where when i enter data in one it calculate results in the others, what i wanted to do is when i enter the data in say text box one then it shifts the decimals points 4places, ie type in 12345 and when i press tab to go to next box then the result would be 1.2345
    i tred something like this but obviously i am wrong

    Private Sub OpenPrice_LostFocus()
    Me.textbox.Text = Format(Me.OpenPrice.Text, "#,###")
    End Sub
    Thnx In Advance

  2. #2
    Fanatic Member
    Join Date
    Feb 2003
    Posts
    599

    Talking

    try
    :

    Text1.Text = Left(Text1.Text, Len(Text1.Text) - 4) & "." & Right(Text1.Text, 4)



    Thank You

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Location
    Sydney
    Posts
    107
    hi,
    that works fine but i need it to change all the text boxes soon as i press tab
    Thnx In Advance

  4. #4
    Fanatic Member
    Join Date
    Feb 2003
    Posts
    599
    place the code in the lost focus event

    will do the job
    cherer
    Thank You

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width