LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default printing using vba; listbox/command button

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

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
printing with a command button [email protected] Excel Discussion (Misc queries) 4 February 2nd 08 12:49 AM
Printing Access reports through Excel command button? Ed Excel Discussion (Misc queries) 0 June 7th 06 03:52 PM
Command Button on User form for Printing Anthony Slater Excel Discussion (Misc queries) 2 September 7th 05 02:01 PM
Command Button problems when printing Don't know enough Excel Programming 1 April 17th 04 03:38 AM
Printing a WorkSheet with an embedded command button Rich[_12_] Excel Programming 1 July 28th 03 01:23 AM


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"