ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run Time Error 1004 (https://www.excelbanter.com/excel-programming/342402-run-time-error-1004-a.html)

ExcelMonkey

Run Time Error 1004
 
I have a line of code which all of sudden stopped working. Can't figure out
why. I am getting an error message saying "Run Time Error 1004. Unable to
set Color Index Property of the Interior Class." I swear it was working ten
minutes ago.

In the immediate window I get:
?sh.Cells.Interior.ColorIndex
-4142

For Each sh In ActiveWorkbook.Worksheets
sh.Cells.Interior.ColorIndex = xlNone
sh.Cells.FormatConditions.Delete
Next sh

ExcelMonkey

Run Time Error 1004
 
Sorry the sheet somehow became protected!!!!!!!!!!

EM

"ExcelMonkey" wrote:

I have a line of code which all of sudden stopped working. Can't figure out
why. I am getting an error message saying "Run Time Error 1004. Unable to
set Color Index Property of the Interior Class." I swear it was working ten
minutes ago.

In the immediate window I get:
?sh.Cells.Interior.ColorIndex
-4142

For Each sh In ActiveWorkbook.Worksheets
sh.Cells.Interior.ColorIndex = xlNone
sh.Cells.FormatConditions.Delete
Next sh



All times are GMT +1. The time now is 03:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com