-
Solved: Error Message when trying to highlight specific cell
The code is looking for a specific cell and I would like to highlight this one, but I always get the error message: "Unable to set Color Property of the Interior class"?
[VBA]Sub CheckDatabase()
Dim x
Worksheets(1).Visible = xlSheetVisible
Worksheets(1).Activate
x = Index + 2
Cells(x, 2).Select
Selection.Interior.Color = vbYellow
End Sub[/VBA]
-
Is the cell locked and the sheet protected?
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
-
yes, it was. I unlocked it and now it is working, thx for this, Is there a way to get the code working and keep some parts of the sheet protected?
-
[vba]Sub CheckDatabase()
Dim x
Worksheets(1).Visible = xlSheetVisible
Worksheets(1).Activate
Worksheets(1).Protect UserInterfaceOnly:=True
x = Index + 2
Cells(x, 2).Select
Selection.Interior.Color = vbYellow
End Sub
[/vba]
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules