I am using a form to populate a row on a spreadsheet. The code below works when the worksheet is not protected, but when it is the line below causes an error. Does anyone know why changing the colour of the cell is causing a issue?
Worksheets("Master").Cells(Row, 9).Interior.ColorIndex = 15 'Change colour of cell
'Change colour of cell and put placed in confirmed order
Worksheets("Master").Cells(Row, 9) = "Placed" 'Put Placed in cell
Worksheets("Master").Cells(Row, 9).Interior.ColorIndex = 15 'Change colour of cell
ewan1979
The code snippet works fine for me on my PC.
I suspect its not a sheet protection issue because the cell is written-to successfully by the previous statement.
I have just noticed that you are using Excel 2003 which may deal with colours differently.
Try a different way of setting the colour, for example:
Bookmarks