Trying to copy the background (plain and gradient fills) from one cell to another based on the Dropdown value selected in the first cell. The attached file has macros and conditional formatting.
I'm able to make the following code work if I MANUALLY set the background fill and THEN type in a value and press <enter>. However, it will not work using the Dropdown selection and conditional formatting.
Kinda new to VBA and have tried a number of things, but no luck. I'm thinking it's something to do with the "Private Sub Worksheet_change(ByVal Target As Range)" line...
Thanks for the help!
</enter>
I'm able to make the following code work if I MANUALLY set the background fill and THEN type in a value and press <enter>. However, it will not work using the Dropdown selection and conditional formatting.
Kinda new to VBA and have tried a number of things, but no luck. I'm thinking it's something to do with the "Private Sub Worksheet_change(ByVal Target As Range)" line...
Thanks for the help!
Code:
Private Sub Worksheet_change(ByVal Target As Range)
ActiveSheet.Protect
Application.EnableEvents = True
' Copy Gradient
If Not Intersect(Target, Range("A1")) Is Nothing Then
ActiveSheet.Unprotect
Application.EnableEvents = False
CopyBkGrndv2 Range("A1"), Range("C1")
CopyBkGrnd Range("A1"), Range("D1")
ActiveSheet.Protect
Application.EnableEvents = True
End If
End Sub