Hi Guys,
I have been chasing my tail on this one.
I have a chart and I want to place a "label" on it using a textbox. I need to make the background of the textbox white and the text black.
here is the code I have.
Thanks
Rick
I have been chasing my tail on this one.
I have a chart and I want to place a "label" on it using a textbox. I need to make the background of the textbox white and the text black.
here is the code I have.
Code:
Sub Sticker()
With ActiveChart.Shapes.AddTextbox(msoTextOrientationHorizontal, 370, 300, 300, 105)
With .TextFrame
.Characters.Text = " OVEN S/N: 834247R FURNACE #: J-1" _
& Chr(13) & " TEMPERATURE RANGE: 1340F-1360F CONTROL SET POINT: 1350F" _
& Chr(13) & " RECORDER READING: CONTROL READING:" _
& Chr(13) & " THERMOCOUPLES: 20" _
& Chr(13) & " SURVEY CONDUCTED BY:____________ DATE: ___________" _
& Chr(13) & " METER NUMBER: 452239 RECALL DATE: 04/14/2019" _
& Chr(13) & " RECORDER S/N:"
.MarginBottom = 0: .MarginLeft = 0
.MarginRight = 0: .MarginTop = 0
.BackColor.RGB = RGB(255, 255, 255) ' <----------------THIS LINE THE PROBLEM!
.HorizontalAlignment = xlHAlignLeft
.VerticalAlignment = xlVAlignCenter
With .Characters.Font
.Name = "Times New Roman": .Size = 8
.FontStyle = "Bold": .ColorIndex = 1
End With
End With
' border
With .Line
.Style = msoLineSingle
.Transparency = 0
.Visible = msoTrue
End With
End With
End Sub
Thanks
Rick