Run Time Error 9
I am getting a run time error 9 about the following peice of code:
Finalrow = Sheets("Word").Range("A65536").End(xlUp).Row Does anyone have any suggestions about how I can fix or get round this. Thanks. |
Run Time Error 9
On Jun 17, 2:38*pm, BoRed79 wrote:
I am getting a run time error 9 about the following peice of code: Finalrow = Sheets("Word").Range("A65536").End(xlUp).Row Does anyone have any suggestions about how I can fix or get round this. Thanks. This error generally occurs when the sheet u r trying to reference is not there. Check if there is any space int he name of Sheet "Word" |
Run Time Error 9
Strange - don't see why that doesn't work.
An alternative (as long as column A is full of data from A1 - but could you adjust the range down a bit if you like): Finalrow = Sheets("Word").Range("A1").CurrentRegion.Rows.Coun t |
Run Time Error 9
I would expect that you don't have a worksheet named Word in that workbook.
Maybe the wrong workbook is active or maybe it's a spelling error in the worksheet name. BoRed79 wrote: I am getting a run time error 9 about the following peice of code: Finalrow = Sheets("Word").Range("A65536").End(xlUp).Row Does anyone have any suggestions about how I can fix or get round this. Thanks. -- Dave Peterson |
Run Time Error 9
Thanks for the suggestion - unfortunately I have tried this alternative and
it gives the same result. I have checked in the file and I definitely have a sheet called "Word" and it is spelt the same and with no spaces. "Smallweed" wrote: Strange - don't see why that doesn't work. An alternative (as long as column A is full of data from A1 - but could you adjust the range down a bit if you like): Finalrow = Sheets("Word").Range("A1").CurrentRegion.Rows.Coun t |
All times are GMT +1. The time now is 09:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com