I'm running macros in one workbook, and after each run I need it to go to an inactive workbook and highlight the active cell (or, the cell that was active before I went to another workbook). Here's what I'm trying:
myWorkbook.Sheets("mySheet").Activate
Worksheets("mySheet").ActiveCell.Interior.ColorIndex = 8
I keep getting an error from the second line saying the object doesn't support this property or method. The sheet is open, but not currently the sheet I'm in when this code runs.
If possible, can I fix this and also have it move the cursor/selection down to the next cell afterward?
Thanks!
Edit: I've also tried myWorkbook.Sheets("mySheet").ActiveCell.Interior.ColorIndex = 8