Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Listing a $ sign in a listbox?

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi-
    Im trying to figure out a code that will list a format("$#,##0.00") in a list box upon activation. This is the code:


    Private Sub UserForm_Activate()
    Dim Lb1, x As Double
    x = 1
    With Sheets("balance sheet")
    While Lb1 <> Int(Now)
    Lb1 = .Range("D1").Offset(x, 0)
    x = x + 1
    Wend

    ListBox1.Clear
    ListBox1.AddItem .Range("D1").Offset(x - 1, 1).Value
    end with
    end sub

    If I dont format the listbox1.add item, I get 3.233333. What I want is the listbox1 to read is $3.23 when its activated. Any ideas?

  2. #2
    MrExcel MVP Russell Hauf's Avatar
    Join Date
    Feb 2002
    Location
    Portland, OR Area - USA
    Posts
    1,607
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try .Text instead of .Value

    HTH,

    Russell

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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