VBA to print report in Color

fvisions

Board Regular
Joined
Jul 29, 2008
Messages
191
Office Version
  1. 365
Platform
  1. Windows
I am looking to add a textbox with the word REVISED in Red and then for it to print on the report. I cant seem to get it to print in color. Current code I below.

' Format certain data ie file header name and sum of data

ActiveSheet.Range("A4:D4").Select
With Selection.Borders(xlBottom)
.Weight = xlMedium
End With
Selection.Font.Size = 14
Selection.Font.Bold = True
ActiveSheet.Columns("A:D").Select
Selection.ColumnWidth = 14
ActiveSheet.Range("A1").Select
ActiveWindow.LargeScroll Down:=1
ActiveSheet.Range("B30").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-25]C:R[-1]C)"
With Selection
.Font.Bold = True
.Font.Size = 14
.NumberFormat = "0.000"
ActiveSheet.Range("A1").Select

'TextBoxfor_revised text box

ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 252.75, 119.75, 93, _
35.5).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = _
"REVISED"
Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 7).ParagraphFormat. _
FirstLineIndent = 0
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 7).Font
.NameComplexScript = "Arial"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.ObjectThemeColor = msoThemeColorDark1
With Selection.Font
.Color = -16776961
.Size = 16
.Name = "Arial"
End With

With ActiveSheet
.PageSetup.BlackAndWhite = False
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Application.PrintCommunication = True
End With
End With
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top