I am working on a spreadsheet, and where a cell is empty, I wish the background to be yellow, so that the user knows that he/she needs to enter data into it. When data is entered, the cell should return to white as normal.
Off the top off my head I tried...
If cells.text = " " THen
cells.text.background = vbyellow
Else
cells.text.background = vbwhite
End If
End Sub
I know I am missing something obvious, but it's been a while since I used VBA and I would like to use it in this instance.
Thanks.
PS - what sort of title should I be using for a sub in excel? would "Private Sub Yellow()" be ok or does it need to be specific to the sheet?
Thanks
Off the top off my head I tried...
If cells.text = " " THen
cells.text.background = vbyellow
Else
cells.text.background = vbwhite
End If
End Sub
I know I am missing something obvious, but it's been a while since I used VBA and I would like to use it in this instance.
Thanks.
PS - what sort of title should I be using for a sub in excel? would "Private Sub Yellow()" be ok or does it need to be specific to the sheet?
Thanks