Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Userforms checkboxes and printing

I have a workbook with a main page and on the page I ahve 7 command buttons
to print specific pages abd 1 command buuton to print all 7 pages.

What I would like to do is contol the printing from a userform.

I have designed a form with 7 checkboxes, a command button to close the form
and a print command button.

What I don't know how to do is get the print button to print the pages
selected by the 7 checkboxes.

Could anyone help with this please.

Thanks in advance for any responses.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Userforms checkboxes and printing

I've sorted it out. If anyone is interested or can suggest a better way, the
code I used is

Private Sub CommandButton1_Click()
If CheckBox1 = True Then
Worksheets("WK 1").PrintOut Copies:=1, Collate:=True
End If
If CheckBox2 = True Then
Worksheets("WK 2").PrintOut Copies:=1, Collate:=True
End If
If CheckBox3 = True Then
Worksheets("WK 3").PrintOut Copies:=1, Collate:=True
End If
If CheckBox4 = True Then
Worksheets("WK 4").PrintOut Copies:=1, Collate:=True
End If
If CheckBox5 = True Then
Worksheets("WK 5").PrintOut Copies:=1, Collate:=True
End If
If CheckBox6 = True Then
Worksheets("EX's").PrintOut Copies:=1, Collate:=True
End If
If CheckBox7 = True Then
Worksheets("MR").PrintOut Copies:=1, Collate:=True
End If
If CheckBox8 = True Then
Worksheets("OT").PrintOut Copies:=1, Collate:=True
End If
End Sub

This works but it does send idividual jobs to the printer. I would prefer it
to be one job, so if any one has any ideas!!!

"Mark Dullingham" wrote:

I have a workbook with a main page and on the page I ahve 7 command buttons
to print specific pages abd 1 command buuton to print all 7 pages.

What I would like to do is contol the printing from a userform.

I have designed a form with 7 checkboxes, a command button to close the form
and a print command button.

What I don't know how to do is get the print button to print the pages
selected by the 7 checkboxes.

Could anyone help with this please.

Thanks in advance for any responses.

Reply
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
Help with Printing Userforms leerem Excel Discussion (Misc queries) 3 November 21st 08 04:48 PM
Printing UserForms leerem Excel Discussion (Misc queries) 1 November 20th 08 10:35 PM
Userforms and Checkboxes Jelinek Excel Programming 1 January 10th 06 12:56 PM
Printing Userforms Greg B[_4_] Excel Programming 3 July 14th 05 11:44 PM
checkboxes on userforms Mike[_49_] Excel Programming 1 January 18th 04 10:52 AM


All times are GMT +1. The time now is 03:09 AM.

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

About Us

"It's about Microsoft Excel"