+ Reply to Thread
Results 1 to 5 of 5

Format Listview Columns to Currency

  1. #1
    Registered User
    Join Date
    08-22-2014
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    81

    Format Listview Columns to Currency

    Hi Everyone Im using a ListView (Not a ListBox) and i want to format 2 of the columns at Currency ($)

    iv looked high and low and cant work out where to insert the code, this is the code im using to populate the listview with data from my spreadsheet, its a Pivot table on the sheet. It works but everything is just text.

    I realise im using a for loop so its on columns 12 and 13 that i need formatted as a currency so the result shows with a "$" symbol. also need to format column 10 as percentage. %

    cheers for any help

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Format Listview Columns to Currency

    Try something like this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Format Listview Columns to Currency

    A SubItem does not have any ability to format its contents - you will have to use the FORMAT commend to format as currency when adding to the subitem. You will have to modify your loop and format the items as needed.

  4. #4
    Registered User
    Join Date
    08-22-2014
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    81

    Re: Format Listview Columns to Currency

    thank you Alpha frog this has worked, i actually tried to do exactly your code with the format but i just couldnt get the brackets in the right place to get it to work for me, its rather late at night here and i guess i was just too tired to get it working, but many thanks its working now

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Format Listview Columns to Currency

    You're welcome. Thanks for the feedback.

+ 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] can not widen columns in listview
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2014, 03:42 PM
  2. ListView populate by columns?
    By mspath in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-14-2012, 03:55 PM
  3. 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
  4. Replies: 15
    Last Post: 02-07-2012, 11:39 AM
  5. Sort columns with numbers on ListView
    By Rodas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-05-2009, 02:25 PM
  6. Format specific columns to currency
    By adyan76 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2009, 03:20 AM
  7. Change General Format to Currency Format:figures together
    By ScottO in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 04:05 AM

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