Hi,
I am a beginner when it comes to macros and don't know much about the code (I just use the record function to create them).
I have a worksheet with a lot of them and they all work fine, however I need to rename the spreadsheet and when I do this I start getting a Run-time error '9'.
I realise the problem is that all the macros I have recorded (which often jump from sheet to sheet) show the specific spreadsheet name in the code and this doesn't change when I rename the spreadsheet. Therefore the code continues to look up the old spreadsheet name which doesn't exist and I get the error.
What is the easiest option to solve this problem? Is there a way of 'hard wiring' the codes to the spreadsheet itself and not just the spreadsheet name which can change?
I just signed up to MrExcel today so hopefully my debut post gets a result!
I am a beginner when it comes to macros and don't know much about the code (I just use the record function to create them).
I have a worksheet with a lot of them and they all work fine, however I need to rename the spreadsheet and when I do this I start getting a Run-time error '9'.
I realise the problem is that all the macros I have recorded (which often jump from sheet to sheet) show the specific spreadsheet name in the code and this doesn't change when I rename the spreadsheet. Therefore the code continues to look up the old spreadsheet name which doesn't exist and I get the error.
What is the easiest option to solve this problem? Is there a way of 'hard wiring' the codes to the spreadsheet itself and not just the spreadsheet name which can change?
I just signed up to MrExcel today so hopefully my debut post gets a result!