+ Reply to Thread
Results 1 to 6 of 6

Print out listbox data code

  1. #1
    Forum Contributor
    Join Date
    03-11-2009
    Location
    Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    252

    Print out listbox data code

    Hi,
    I have no idea how to print all value appears on the listbox .I tried some code but failed.

    Thanks in advance
    herukuncahyono
    Attached Files Attached Files
    Last edited by herukuncahyono; 04-12-2010 at 08:52 PM.

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Print out listbox data code

    I don't really understand what you are trying to do.


    click on the * Add Reputation if this was useful or entertaining.

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Print out listbox data code

    You would need to write the list box values to a range of cells and print from the worksheet.

    However, since you are using Case Statements to fill the list box, why not just set the print area to that range of cells and print as needed? You could, if necessary, copy the cells to another worksheet.

    This is, by far the easiest way to go about it as the code would be very minimal.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  4. #4
    Forum Contributor
    Join Date
    03-11-2009
    Location
    Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    252

    Re: Print out listbox data code

    hi Palmetto,
    thanks for the reply ,I almost get a solution on the internet(code to print listbox) but the problem is, there are only 1 column was printed ( I attach an example ) I want all data in listbox is printed,
    thanks in advance

    herukuncahyono
    Attached Files Attached Files

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Print out listbox data code

    In order to print each column of the list box you must reference each column, like so:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    03-11-2009
    Location
    Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    252

    Re: Print out listbox data code

    hi Palmetto,
    great fit with my expectations,my problem solved

    thank you I really appreciate it

    herukuncahyono

+ 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