jmarting13
New Member
- Joined
- Mar 2, 2021
- Messages
- 39
- Platform
- Windows
Private Sub Worksheet_Calculate()
Dim Xrg As Range
Set Xrg = Range("K1")
If Not Intersect(Xrg, Range("K1")) Is Nothing Then
MsgBox "This is fun"
Range("A1:J37").Font.Color = vbBlack
End If
If Range("K1").Value = "Quote" Then
target.Font.Color = vbBlack
Else
target.Font.Color = vbRed
End If
End Sub
I keep getting an error on the two lines of code that start with "target.font.color"
Basically if the value in K1 is "Quote", I want the main font color to be black, and if it isn't then red.
How do I define a range for the target.font.color?
Dim Xrg As Range
Set Xrg = Range("K1")
If Not Intersect(Xrg, Range("K1")) Is Nothing Then
MsgBox "This is fun"
Range("A1:J37").Font.Color = vbBlack
End If
If Range("K1").Value = "Quote" Then
target.Font.Color = vbBlack
Else
target.Font.Color = vbRed
End If
End Sub
I keep getting an error on the two lines of code that start with "target.font.color"
Basically if the value in K1 is "Quote", I want the main font color to be black, and if it isn't then red.
How do I define a range for the target.font.color?