Hello,
I have some data that I want to color once a button is clicked. I want it to go to the next cell and stop once the cell contains an empty string.
Here is my code:
I keep getting an error of: "Run-Time Error 424 object required.
Thanks!
I have some data that I want to color once a button is clicked. I want it to go to the next cell and stop once the cell contains an empty string.
Here is my code:
Code:
Private Sub CommandButton1_Click()
Dim C As Variant
Range("A1").Select
C = ActiveCell.Offset(1, 0).Value
Do
ActiveCell.Offset(1, 0).Select
C.Interior.Color = vbMagenta
Loop While ActiveCell.Value <> " "
End Sub
I keep getting an error of: "Run-Time Error 424 object required.
Thanks!