Run Time Error 9

B

BoRed79

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.
 
N

Nayab

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"
 
S

Smallweed

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.Count
 
D

Dave Peterson

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.
 
B

BoRed79

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top