• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Print a listbox in a userform

hoomantt

Member
Hi Dear Professors,
i have a listbox(listbox1) in a userform(userform1) in my workbook .
i want a command button in my userform to print( print preview)data that shows in listbox1 .
can you please help me with a sample file ? i am a beginner in vb and can not use only codes . i need a sample file,please.
oh,i have another questions !!!
is there any way to print that listbox :
1-with borders between col and rows
2-is there any way to make column header in first row when we print?
3-is there any way to fill color in first row(header in quest.2)?
4-is there any way to Bold font of header(header in quest.2)?

Thanks alot
form all of you
 
The other way to do this is to load the List Box from a worksheet range
That way you control the properties of the range and can print it as required.

upload_2014-8-26_11-36-27.png

See attached file:
 

Attachments

  • Load List Box.xlsm
    28.2 KB · Views: 108
Last edited:
Dear sir Hui;
thanks a lot from your help .
Thanks a lot
i upload my file here for you.
when i change drop down list my data in list box will change
i want a macro on this user form for print just data in the list box .
if there is any way when i print , i want borders between data and bold the first row and color full it .
my data header are not in list box , they are in labels on top of the list box and when i print it , they should be printed!(they are my first row that i want print bold and color full)
thanks a lot Sir...
 

Attachments

  • ff.xlsm
    42.5 KB · Views: 46
Did you look at the technique I demonstrated in my example in the post above ?
 
Back
Top