computing
  • 0

Solved Print Excel Chart In Color Using Vba

  • 0

I am trying to use a macro to print a chart in color but I am not having any luck. Does anyone have any ideas? I am using Excel 2010

Share

1 Answer

  1. If my printer properties are set to Color, then this code will print a sheet in B&W;:

    Sub PrintBW
      ActiveSheet.PageSetup.BlackAndWhite = True
      ActiveSheet.PrintOut
    End Sub

    and this code will print the sheet in color:

    Sub PrintColor
      ActiveSheet.PageSetup.BlackAndWhite = False
      ActiveSheet.PrintOut
    End Sub

    However, if my printer properties are set to Black/Grayscale, the False setting doesn’t appear to do anything. i.e. this code will not print the sheet in color.

    Sub PrintColor
      ActiveSheet.PageSetup.BlackAndWhite = False
      ActiveSheet.PrintOut
    End Sub

    Seems like the printer properties must be set to color for the “False” argument to work.

    Another option is to set up 2 printers on your system and print directly to the B&W; printer or the Color printer in your code. I realize that in some environments, that may not be possible.

    Click Here Before Posting Data or VBA Code —> How To Post Data or Code.

    • 0