below is a vb code, which basically populates headers (left and center) with project information.
I fill in the cells in column "B" on the header sheet, then click "Update Headers" button and the info in column B is fed to the headers of two other pages in the workbook.
Some of the header items are not bold and i want them to be bold and other items are bold and i want them to be normal.
ALSO....two items I want to be RED and BOLD: Here is the code...after the code I will list the items I want to edit:
On Coat.Activate I would appreciate the following:
LEFT HEADER ITEMS TO EDIT:
the OPS-PO to be bold
The "Estimated As Lead?" value to be BOLD GREEN if it is NO and BOLD RED if it is YES
The LEAD Results vale to be BOLD GREEN if NEG and BOLD RED IF POS
CENTER HEADER ITEMS TO EDIT:
WO# and value i plug in header sheet to not be bold
PO# and value i plug in header sheet to not be bold
On Ins.Activate I would appreciate the following:
the OPS-PO to be bold
the ASBESTOS? result to be BOLD RED for YES and BOLD GREEN for NO
WO# and value i plug in header sheet to not be bold
PO# and value i plug in header sheet to not be bold
I would greatly appreciate anyone that can help me edit the code.
I've attached a pic of the header sheet where i plug all the info in column B.
I fill in the cells in column "B" on the header sheet, then click "Update Headers" button and the info in column B is fed to the headers of two other pages in the workbook.
Some of the header items are not bold and i want them to be bold and other items are bold and i want them to be normal.
ALSO....two items I want to be RED and BOLD: Here is the code...after the code I will list the items I want to edit:
VBA Code:
Sub WrkshtHeader()
Dim Headers As Worksheet
Dim Master As Worksheet
Dim CoatingsProgress As Worksheet
Dim InsulationProgress As Worksheet
Dim JobDesc As Range
Dim WO As Range
Dim PO As Range
Dim EstAsLead As Range
Dim Asbestos As Range
Dim SurfacePrepOPS As Range
Dim SurfacePrepPO As Range
Dim EnclosePCOPS As Range
Dim EnclosePCPO As Range
Dim RemoveInsINSOPS As Range
Dim RemoveInsINSPO As Range
Dim CleanUPOPS As Range
Dim CleanUPPO As Range
Dim FCOOPS As Range
Dim FCOPO As Range
Dim LeadResults As Range
Set Headers = Worksheets("Headers")
Set Master = Worksheets("Master")
Set Ins = Worksheets("Insulation Progress")
Set Coat = Worksheets("Coatings Progress")
Set JobDesc = Headers.Range("B2")
Set WO = Headers.Range("B3")
Set PO = Headers.Range("B4")
Set EstAsLead = Headers.Range("B5")
Set LeadResults = Headers.Range("B6")
Set Asbestos = Headers.Range("B7")
Set SurfacePrepOPS = Headers.Range("B8")
Set EnclosePCOPS = Headers.Range("B9")
Set RemoveInsINSOPS = Headers.Range("B10")
Set CleanUPOPS = Headers.Range("B11")
Set FCOOPS = Headers.Range("B12")
On Error GoTo errExit
Application.ScreenUpdating = False
Application.EnableEvents = False
Ins.Activate
With Ins.PageSetup
.LeftHeader = "&""Arial""&16OPS-PO" & Chr(10) & "&14Enclose/PC: " & EnclosePCOPS & Chr(10) & "&14Remove/Install INS: " & RemoveInsINSOPS & Chr(10) & "&14CleanUp: " & CleanUPOPS & Chr(10) & "&14FCO: " & FCOOPS & Chr(10)
.CenterHeader = "&""Arial,Bold""&24" & JobDesc & Chr(10) & "&16Insulation Progress" & Chr(10) & "&14ASBESTOS? " & Asbestos & Chr(10) & "&14Work Order # " & WO & Chr(10) & "&14PO# " & PO
End With
Coat.Activate
With Coat.PageSetup
.LeftHeader = "&""Arial""&16OPS-PO" & Chr(10) & "&14SP/Paint/Watchers: " & SurfacePrepOPS & Chr(10) & "&14CleanUp: " & CleanUPOPS & Chr(10) & "&14FCO: " & FCOOPS & Chr(10) & "&14Estimated as LEAD? " & EstAsLead & Chr(10) & "&14LEAD Results: " & LeadResults & Chr(10)
.CenterHeader = "&""Arial,Bold""&24" & JobDesc & Chr(10) & "&16Coatings Progress" & Chr(10) & "&14WO# " & WO & Chr(10) & "&14PO# " & PO
End With
Master.Activate
With Master.PageSetup
.CenterHeader = "&""Arial,Bold""&24" & JobDesc & Chr(10)
End With
errExit:
Headers.Activate
MsgBox "Headers Update Completed!"
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
On Coat.Activate I would appreciate the following:
LEFT HEADER ITEMS TO EDIT:
the OPS-PO to be bold
The "Estimated As Lead?" value to be BOLD GREEN if it is NO and BOLD RED if it is YES
The LEAD Results vale to be BOLD GREEN if NEG and BOLD RED IF POS
CENTER HEADER ITEMS TO EDIT:
WO# and value i plug in header sheet to not be bold
PO# and value i plug in header sheet to not be bold
On Ins.Activate I would appreciate the following:
the OPS-PO to be bold
the ASBESTOS? result to be BOLD RED for YES and BOLD GREEN for NO
WO# and value i plug in header sheet to not be bold
PO# and value i plug in header sheet to not be bold
I would greatly appreciate anyone that can help me edit the code.
I've attached a pic of the header sheet where i plug all the info in column B.