+ Reply to Thread
Results 1 to 4 of 4

Format string color

Hybrid View

tradinup2 Format string color 03-11-2013, 03:51 PM
tradinup2 Re: Format string color 03-11-2013, 11:22 PM
Andy Pope Re: Format string color 03-12-2013, 05:19 AM
tradinup2 Re: Format string color 03-12-2013, 08:26 AM
  1. #1
    Registered User
    Join Date
    01-29-2013
    Location
    texas
    MS-Off Ver
    Excel 2010
    Posts
    68

    Format string color

    This code:

    .List(.ListCount - 1, 3) = Format(Format(myNewArray(i, 13), "###,##0.00"), "@@@@@@@@@@@@@")
    does a decent job aligning the output to a column in a list box.

    I would like to be able to change the color of the string to red for a negative number.

  2. #2
    Registered User
    Join Date
    01-29-2013
    Location
    texas
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Format string color

    This only works to format cells it seems.

    a = "1234"
    b = Format(a, "0.00;[red]-0.00")

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Format string color

    The standard listbox control, Form or ActiveX, does not support font colouring of individual list items.

    You would need to use the ListView control.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    01-29-2013
    Location
    texas
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Format string color

    thanks, I'll check it out.

+ 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