Hi,
I am trying to change the color of a cell on a specific sheet when an action occurs either on button click on on open.
However it keeps throwing out a 1004 error code
Application-defined or object defined error.
The code exists in the main workbook
The confusing part is that it recognises the initial if statement because it will print the MsgBox but then finds fault with the part where i ask it to link to the specific spreadsheet. As you can see from the exert above i have tried a few different variations of linking to the sheet.
My spreadsheet contains lots of other code so to troubleshoot i tried to change the cell colour in a new spreadsheet project and the above code and it works fine.
Any ideas why it is not working would be greatly appreciated.
I find it confusing that the if statement can find the requested sheet but the statements inside cannot?
Thank you in advance
Many thanks
Bookmarks