Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default 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"
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
run time error 1004 general odbc error excel 2003 vba Mentos Excel Programming 5 January 24th 11 02:56 PM
Error handling error # 1004 Run-time error [email protected] Excel Programming 3 May 20th 08 02:23 PM
Run Time Error 1004: Application or Object Defined Error BEEJAY Excel Programming 4 October 18th 06 04:19 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM


All times are GMT +1. The time now is 11:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"