+ Reply to Thread
Results 1 to 4 of 4

Carry Values Right Of Decimal Pt to Another Location

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Carry Values Right Of Decimal Pt to Another Location

    Hi all,

    I've got another burdening issue that I can't seem to figure out.
    I've got a ListBox with values containing decimals like (1.7, 2.55)
    For some reason the fractional value to the right of the decimal point is being dropped off
    when I try to make a textbox value equal the selected listbox value. This is within a userform or even trying to carry the value to a textbox on different userform.

    Any help resolving this is appreciated.

    Thanks,

    BDB
    Last edited by bdb1974; 01-26-2011 at 04:04 PM.

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Carry Values Right Of Decimal Pt to Another Location

    Do you have your format on the destination textbox set to show decimals?
    If you're using a variable, is it a double instead of integer or long?
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Carry Values Right Of Decimal Pt to Another Location

    Here's something that I have tried but with no luck.
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Carry Values Right Of Decimal Pt to Another Location

    Ok, this works. I had some other code preventing if from running.
    Private Sub ListBox1_Click()
    Dim LValue As String
    With Me.ListBox1
    LValue = Format(.Value, "##.##")
    Me.TextBox1.Value = LValue
    End With
    End Sub
    Thanks for the reply DaveGugg

    BDB

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1