vba code for printing

B

bkey01

I have an Excel workbook containing over 40 sheets with each having a
least 7 pages setup to print out in the page setup area.

I have multiple listboxes setup to goto specific cell that contain th
start of each page.

I am trying to write a code in vb using a listbox and command button t
print certain pages from different sheets. i.e. On sheet 1, I want t
print the information that starts in cell a50 and ends in aa110 an
then on sheet2, I want to print the information that starts in cell a1
and ends in aa32 and so on.

Example of code I have tried:
if listbox1.selected(0) then goto errhandler1
listbos1.selected(0) = false

errhandler1:
sheet1.range(a50:aa110).printout
end sub

THIS DID NOT WORK FOR ME!

Can someone please help me with this.

Thanks in advance
 
Top