Can someone tell me why the font formatting isn't working? There is data in row 1 and row 2, but the font type and size are not changing when I activate the worksheet.
Code:
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
Dim csws6, csws7 As Worksheet
Dim csLastRow7 As Long
Set csws6 = ThisWorkbook.Sheets("Pymt Tracker")
Set csws7 = ThisWorkbook.Sheets("Financials")
csLastRow7 = csws7.Range("D" & Rows.Count).End(xlUp).Row
If csws7.Range("CB" & csLastRow7).Value = "Pymt Status" Then
Exit Sub
Else
If csws7.Range("CB" & csLastRow7).Value = "Current" Then
Call GetFinancialDetails
Exit Sub
Else
If Not csws7.Range("CB" & csLastRow7).Value = "Current" Then
csws7.Range("A" & csLastRow7 & ":CB" & csLastRow7).Copy
csws7.Range("A" & csLastRow7 + 1).PasteSpecial
csws7.Range("X" & csLastRow7 + 1).Value = ""
csws7.Range("AH" & csLastRow7 + 1).Value = ""
csws7.Range("AR" & csLastRow7 + 1).Value = ""
csws7.Range("BB" & csLastRow7 + 1).Value = ""
csws7.Range("BL" & csLastRow7 + 1).Value = ""
csws7.Range("BT" & csLastRow7 + 1).Value = 0
csws7.Range("BU" & csLastRow7 + 1).Value = 0
csws7.Range("BV" & csLastRow7 + 1).Value = 0
csws7.Range("BW" & csLastRow7 + 1).Value = 0
csws7.Range("BX" & csLastRow7 + 1).Value = 0
csws6.Activate
csws7.Activate
End If
End If
End If
Call GetFinancialDetails
Application.CutCopyMode = False
[COLOR=#ff0000]With UsedRange.Cells[/COLOR]
[COLOR=#ff0000] .HorizontalAlignment = xlCenter[/COLOR]
[COLOR=#ff0000] .Borders.LineStyle = xlContinuous[/COLOR]
[COLOR=#ff0000] With .Font[/COLOR]
[COLOR=#ff0000] .Name = "Calibri"[/COLOR]
[COLOR=#ff0000] .Size = 10[/COLOR]
[COLOR=#ff0000] End With[/COLOR]
[COLOR=#ff0000] .EntireColumn.AutoFit[/COLOR]
[COLOR=#ff0000]End With[/COLOR]
Application.ScreenUpdating = True
End Sub