Mick Peters
Board Regular
- Joined
- May 18, 2015
- Messages
- 93
I am trying to change the colour of a cell in column A from information I have on a form. I have managed to change the colour of A1 with the below code, so that part works, but I want the Range ("A1") to pick up inflation from a text box on the form (Form1.txtRow). I have tried what I can think of EG Range ("A&txtRow") and a number of other combination but I cannot get this to change the cell of the item I want. Any help would be appreciated.
Private Sub CheckBox2_Click()
Dim xRng As Range
Set xRng = Range("A1")
If CheckBox2.Value = True Then
xRng.Interior.Color = vbBlue
Else
xRng.Interior.Color = xlNone
End If
End Sub
Thank you,
Mick.
Private Sub CheckBox2_Click()
Dim xRng As Range
Set xRng = Range("A1")
If CheckBox2.Value = True Then
xRng.Interior.Color = vbBlue
Else
xRng.Interior.Color = xlNone
End If
End Sub
Thank you,
Mick.