Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unspecify Error in Range count

I have the error with this statement:

MyRow = Workbooks("convert").Sheets("CNV").Cells(65536,
1).End(xlUp).Row()

The error "Subscript out of range". event it has been OK for running
thousand times before. I have remove Exel XP and reinstall it but it
still have error. Now, I use Office2003 but everything can not work.
May be it came from some update of my WindowsXP, but I have reinstall
my WindowsXP already.

Could you help me to solve this? Thanks much!


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Unspecify Error in Range count

Sounds like the sheet name may be wrong.
Try to isolate the error..
break it out & see where the error comes

WITH Workbooks("convert").Sheets("CNV").
MyRow = .Range("A65000").End(xlUp).Row
END WITH

Note that there are no brackets round Row
.Row
not
.Row()


Patrick Molloy
Microsoft Excel MVP




-----Original Message-----
I have the error with this statement:

MyRow = Workbooks("convert").Sheets("CNV").Cells(65536,
1).End(xlUp).Row()

The error "Subscript out of range". event it has been OK

for running
thousand times before. I have remove Exel XP and

reinstall it but it
still have error. Now, I use Office2003 but everything

can not work.
May be it came from some update of my WindowsXP, but I

have reinstall
my WindowsXP already.

Could you help me to solve this? Thanks much!


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unspecify Error in Range count

Patrick Molloy wrote:
[b]Sounds like the sheet name may be wrong.
Try to isolate the error..
break it out & see where the error comes

WITH Workbooks("convert").Sheets("CNV").
MyRow = .Range("A65000").End(xlUp).Row
END WITH

Note that there are no brackets round Row
.Row
not
.Row()


Patrick Molloy
Microsoft Excel MVP


Thanks Patrick,
I have tried to change, this time the error appears follow:
WITH Workbooks("convert").Sheets("CNV")

with the same description "Subscript out of range".
I also change it to
MyRow = Worksheets("CNV").Cells(65536,1).End(xlUp).Row()

and it works well. But this way is useful when I work in currently
workbook only and ofcourse I could not reference to worksheets in
another workbook. Sounds it needs some lib, but I do not know yet.


---
Message posted from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Unspecify Error in Range count

Does it work if you include the .xls?

WITH Workbooks("convert.xls").Sheets("CNV")......




BinhNT wrote:

Patrick Molloy wrote:
[b]Sounds like the sheet name may be wrong.
Try to isolate the error..
break it out & see where the error comes

WITH Workbooks("convert").Sheets("CNV").
MyRow = .Range("A65000").End(xlUp).Row
END WITH

Note that there are no brackets round Row
.Row
not
.Row()


Patrick Molloy
Microsoft Excel MVP


Thanks Patrick,
I have tried to change, this time the error appears follow:
WITH Workbooks("convert").Sheets("CNV")

with the same description "Subscript out of range".
I also change it to
MyRow = Worksheets("CNV").Cells(65536,1).End(xlUp).Row()

and it works well. But this way is useful when I work in currently
workbook only and ofcourse I could not reference to worksheets in
another workbook. Sounds it needs some lib, but I do not know yet.

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unspecify Error in Range count

Many thanks Dave,
It works well, everything.


---
Message posted from http://www.ExcelForum.com/

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
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Multiple Criteria, Count If, Sum Product to get count across range Jonathan Excel Worksheet Functions 5 January 9th 08 11:32 PM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM


All times are GMT +1. The time now is 03:45 AM.

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

About Us

"It's about Microsoft Excel"