I recently started using Excel 2013 on one of my computers and was transferring over some VBA from my personal workbook. One of these programs highlights cells using essentially the code below.
This line of code no longer works in Excel 2013 and I can't figure out why. I'm wondering if it has something to do with the Single Document Interface. When I run the line of code above in the Immediate window of my 2010 version it changes the cell color but in 2013 it throws a Run-time error 1004 Application-defined or object-defined error. The documentation on MSDN doesn't seem to callout any changes to these properties. If I replace the .Interior.Color with .Select it selects the correct cell so it seems like my reference to the cell is working correctly.
If anyone has any insight it would be greatly appreciated.
Code:
ActiveSheet.Cells(3,1).Interior.Color = RGB(255,255,255)
This line of code no longer works in Excel 2013 and I can't figure out why. I'm wondering if it has something to do with the Single Document Interface. When I run the line of code above in the Immediate window of my 2010 version it changes the cell color but in 2013 it throws a Run-time error 1004 Application-defined or object-defined error. The documentation on MSDN doesn't seem to callout any changes to these properties. If I replace the .Interior.Color with .Select it selects the correct cell so it seems like my reference to the cell is working correctly.
If anyone has any insight it would be greatly appreciated.