Hi,
I am having problems changing the cell color on button click.
I want the cells to be invisible/white when the file opens but when i click a button for the cell to change color.
Please see code below
Private Sub Workbook_Open()
If ThisWorkbook.Sheets("Quotation Form").Range("A44").Interior.ColorIndex = 15 Then
MsgBox "i am white"
Sheets("Quotation Form").Range("A44").Interior.ColorIndex = 2
Else
End If
End Sub
And then on the sheet with the button the following code
Private Sub CommandButton2_Click()
If ThisWorkbook.Sheets("Quotation Form").Range("A44").Interior.ColorIndex = 2 Then
ThisWorkbook.Sheets("Quotation Form").Range("A44").Interior.ColorIndex = 15
Else
End If
End Sub
It is giving me a
run time error 1004
Application-Defined or object-defined error
Any ideas or help much appreciated.
Thanks in advance
Bookmarks