Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi I want to be able to choose whether printout is to be in black an white or color. I'm using the code below, but dont know how to set the option to colo or b/w Can someone lead me to the right track? Function Print Dim Svar As String Dim i As Long Svar = MsgBox("Do you want to print in color?", vbYesNo, "Print out") If Svar = vbYes Then ActiveSheet.Select For i = 4 To 33 Rows(i).EntireRow.Hidden = Range("A" & i).Value = 0 Next i ActiveSheet.Select .BlackAndWhite = False ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True ActiveSheet.Select For i = 4 To 33 Rows(i).EntireRow.Hidden = False Next i Range("A1").Select Else If Svar = vbNo Then ActiveSheet.Select For i = 4 To 33 Rows(i).EntireRow.Hidden = Range("A" & i).Value = 0 Next i ActiveSheet.Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True .BlackAndWhite = True ActiveSheet.Select For i = 4 To 33 Rows(i).EntireRow.Hidden = False Next i Range("A1").Select End If End If End Function //Thoma -- Jonsso ----------------------------------------------------------------------- Jonsson's Profile: http://www.excelforum.com/member.php...nfo&userid=547 View this thread: http://www.excelforum.com/showthread.php?threadid=38841 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I choose font color while tracking changes. | Excel Discussion (Misc queries) | |||
choose a specific color for my chart | Charts and Charting in Excel | |||
Colored Contact Lenses - How To Choose The Color That Is Best For You | Excel Discussion (Misc queries) | |||
Printout method: in color, duplex | Excel Programming | |||
Vba printout | Excel Programming |