Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Checkboxes and Cobinations

Hi all,

The problem i have at the moment is that i have to produce 20 or so reports
into a trading pack for work. The way i have approached this is to use a
userform with 20 check boxes for each report. I want to be able for example
to select reports 1,5 and 19 and only print the selected reports. I would
like to know if there is an easy way of doing this than writing out the
thousands of different combinations in code, i.e Checkbox1.value = true and
Checkbox2.value = false etc,

Here is my code so far,
thanks very much for any help.

Private Sub CommandButton1_Click()
Copies = TextBox1.Value

If CheckBox1.Value = True Then
Workbooks.Open Filename:= _
"\\mm-fpvs-01\Home\sparrett\My Documents\Trading pack print
test\Report1.xls"
Else

If CheckBox2.Value = True Then
Workbooks.Open Filename:= _
"\\mm-fpvs-01\Home\sparrett\My Documents\Trading pack print
test\Report2.xls"

Else

If CheckBox3.Value = True Then
Workbooks.Open Filename:= _
"\\mm-fpvs-01\Home\sparrett\My Documents\Trading pack print
test\Report3.xls"

End If
End If
End If
Windows("MasterPrint.xls").Activate
Range("a1").Select
ActiveCell.Value = 0
Range("b1").Value = Copies


Do Until ActiveCell.Value = Range("b1").Value


If CheckBox1.Value = True Then
Windows("Report1.xls").Activate
ActiveWindow.Visible = True
'ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
MsgBox ("print1")

If CheckBox2.Value = True Then
Windows("Report2.xls").Activate
ActiveWindow.Visible = True
'ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
MsgBox ("print2")

If CheckBox3.Value = True Then
Windows("Report3.xls").Activate
ActiveWindow.Visible = True
'ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
MsgBox ("print3")
End If
End If
End If

Windows("MasterPrint.xls").Activate
ActiveCell.Offset(1, 0).Select
ActiveCell.Formula = "=r[-1]+1"

Loop

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Checkboxes and Cobinations

Check this out

http://j-walk.com/ss/excel/tips/tip48.htm
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
Checkboxes Elaine Excel Discussion (Misc queries) 6 August 20th 09 01:41 AM
Using Checkboxes ppidgursky Excel Discussion (Misc queries) 0 April 7th 09 07:24 PM
checkboxes hshayhorn Excel Programming 3 September 6th 07 11:18 PM
Checkboxes Tammy H Excel Programming 2 October 19th 06 06:13 PM
Checkboxes Randy L Excel Discussion (Misc queries) 3 February 22nd 06 08:09 PM


All times are GMT +1. The time now is 10:11 PM.

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"