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 Choose printout color or b/w using vba


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
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
How do I choose font color while tracking changes. CapitalCity Excel Discussion (Misc queries) 1 August 12th 09 03:22 AM
choose a specific color for my chart Berit Charts and Charting in Excel 1 June 18th 09 01:23 PM
Colored Contact Lenses - How To Choose The Color That Is Best For You [email protected] Excel Discussion (Misc queries) 0 January 22nd 08 10:12 PM
Printout method: in color, duplex [email protected] Excel Programming 3 January 4th 05 08:55 PM
Vba printout Curtis[_6_] Excel Programming 2 October 7th 04 08:46 PM


All times are GMT +1. The time now is 01:14 AM.

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"