+ Reply to Thread
Results 1 to 16 of 16

Adding currency format to ListView columns

  1. #1
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Adding currency format to ListView columns

    Hi all

    I have a Userfrom with a List View, below code loads list view items from an excel sheet, it has 24 columns

    how do I add currency format below code that List view columns 7,8,9,10,11,12,13,14 shows as currency

    any help will be apricated

    Please Login or Register  to view this content.

    many thanks in advance

  2. #2
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: Adding currency format to ListView columns

    Format the value before adding it.


    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    Same with the ListSubItems

  3. #3
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Adding currency format to ListView columns

    thank you for your reply, I have added your suggestion, but it hasn't worked

    Please Login or Register  to view this content.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Adding currency format to ListView columns

    The line in bold replaces the line below it.
    Rory

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Adding currency format to ListView columns

    If data in those columns is formatted as currency, try change all .Value to .Text

  6. #6
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Adding currency format to ListView columns

    I tries this one and it didn't work either, sorry to be a pain

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Adding currency format to ListView columns

    Quote Originally Posted by jindon View Post
    If data in those columns is formatted as currency, try change all .Value to .Text
    only yellow highlighted should have currency values the others date or some references

    Capture.PNG

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Adding currency format to ListView columns

    I meant to say the data in those columns in the worksheet.

    If the columns are formatted as you want to see on list view, .Text property should appear as what you see on the worksheet.

  9. #9
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Adding currency format to ListView columns

    Quote Originally Posted by jindon View Post
    I meant to say the data in those columns in the worksheet.

    If the columns are formatted as you want to see on list view, .Text property should appear as what you see on the worksheet.
    This is how the excel sheet look behind the user form

    Attachment 805564

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Adding currency format to ListView columns

    Your attachement is invalid, so can not open.

  11. #11
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Adding currency format to ListView columns

    Quote Originally Posted by jindon View Post
    Your attachement is invalid, so can not open.
    sorry here it is again

    Capture2.PNG

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Adding currency format to ListView columns

    Did you change all the .Value property to .Text in the code posted in your initial post #1?

    If so and doesn't work, I need to see your workbook.

  13. #13
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Adding currency format to ListView columns

    here is the workbook

    thanks
    Attached Files Attached Files

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Adding currency format to ListView columns

    ListView control doen't seem to accept special characters.
    So, if you can change it to ListBox, it is lot easier.

    example
    Please Login or Register  to view this content.
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Adding currency format to ListView columns

    this code worked on ListView

    thank you very much for your time nad Thank you to ByteMarks too

    Please Login or Register  to view this content.

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Adding currency format to ListView columns

    That was my attempt but it doesn't work here, so I didn't mention.

    Perhaps it is the difference of local settings...

    That's good if it is working at your end anyway.
    Last edited by jindon; 11-18-2022 at 10:27 AM.

+ 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] Format Listview Columns to Currency
    By Andrew Andromeda in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-26-2016, 10:28 AM
  2. [SOLVED] Adding currency broken in two columns?
    By Blue Hornet in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 PM
  3. Adding currency broken in two columns?
    By lperisich in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  4. Adding currency broken in two columns?
    By lperisich in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  5. Adding currency broken in two columns?
    By lperisich in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  6. Adding currency broken in two columns?
    By lperisich in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. Adding currency broken in two columns?
    By lperisich in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

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