+ Reply to Thread
Results 1 to 6 of 6

Change rowcolor in Listview depending on value excel vba

  1. #1
    Registered User
    Join Date
    08-25-2021
    Location
    Kuching, Malaysia
    MS-Off Ver
    2016 32bits
    Posts
    30

    Post Change rowcolor in Listview depending on value excel vba

    Dear friends,

    Is it possible to format rows in listview according to status: I need a conditional formatting like this:
    1- When Column 13 value is "Down" ,I want the whole row in my listview becomes red.
    2- When Column 13 value is "Up" ,I want the whole row in my listview becomes green.

    Another thing i would like to do is to change the time and date format inside listview
    1. Date change to - dd/mm/yy
    2. Time change to - hh:mm

    i've search tons of example but could't find one, i hope someone can help me with this.
    Attached herewith is the excel file


    Waiting for your reply.Thanks in advance,

    http://www.vbaexpress.com/forum/show...ng-in-Listview cross-post link added by Moderator --6SJ
    Last edited by Cyril Beki; 09-14-2021 at 10:46 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,675

    Re: Change rowcolor in Listview depending on value excel vba

    You cannot format individual rows of a ListView (or ListBox, or ComboBox).
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-25-2021
    Location
    Kuching, Malaysia
    MS-Off Ver
    2016 32bits
    Posts
    30
    Quote Originally Posted by 6StringJazzer View Post
    You cannot format individual rows of a ListView (or ListBox, or ComboBox).
    I think it’s possible to do because i once saw a video whereby it change the color based on status in the listview

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,302

    Re: Change rowcolor in Listview depending on value excel vba

    I think it’s possible to do because i once saw a video whereby it change the color based on status in the listview
    When you have found it please post back on this site as no doubt a great number of us would like to incorporate it into our apps.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  5. #5
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,302

    Re: Change rowcolor in Listview depending on value excel vba

    One from the depth of my archives - posted on this site in the distant past.
    The O.P. wanted to highlight entries that had data missing in column 3 of the listbox.
    You may be able to incorporate such a procedure.
    Attached Files Attached Files

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,675

    Re: Change rowcolor in Listview depending on value excel vba

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    Since you are a new member I have done this for you but please follow all rules in the future.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Conditional Formatting based on another cells Conditional Formatting
    By chriskay in forum Excel General
    Replies: 4
    Last Post: 08-22-2019, 05:33 AM
  2. [SOLVED] Override conditional formatting (in general, without changing the conditional formatting)
    By Stormin' in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2017, 07:15 AM
  3. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  4. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  7. Listview checked row delete line in Listview and in worksheet data
    By madforit in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2012, 01:00 PM

Tags for this Thread

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