Hi all, I have a macro which looks to select a workbook as it's first command ...
If the file is available to select then the macro will run and I have no issues but I am trying to write something that will automatically click "END" upon receiving the "Run time error '9': Subscript out of range" error message box if in fact the workbook is not available to select. Also after auto selecting or confirming "END" I would like to display a message box.
Can anyone help me with this? Many thanks
Code:
Windows("FileName.XLSX").Activate
If the file is available to select then the macro will run and I have no issues but I am trying to write something that will automatically click "END" upon receiving the "Run time error '9': Subscript out of range" error message box if in fact the workbook is not available to select. Also after auto selecting or confirming "END" I would like to display a message box.
Can anyone help me with this? Many thanks