ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   2,560 cell limit??? (https://www.excelbanter.com/excel-programming/311172-2-560-cell-limit.html)

Joseph Czapski

2,560 cell limit???
 
Hi. I've run into Excel 2003 complaining that I'd exceeded 2,560 cells. Is
there a limit to how many cells whose values you can insert individually
programatically via Excel's object library? Thanks.

Joe Czapski
Boston, Mass.




Dave Peterson[_3_]

2,560 cell limit???
 
I don't think so.

This worked for me:

Option Explicit
Sub testme()
ActiveSheet.Cells.Value = 1
End Sub


All 16,777,216 were changed to 1.

You may want to be a little more specific.


Joseph Czapski wrote:

Hi. I've run into Excel 2003 complaining that I'd exceeded 2,560 cells. Is
there a limit to how many cells whose values you can insert individually
programatically via Excel's object library? Thanks.

Joe Czapski
Boston, Mass.


--

Dave Peterson


Joseph Czapski

2,560 cell limit???
 
"Dave Peterson" wrote:
I don't think so.

This worked for me:

Option Explicit
Sub testme()
ActiveSheet.Cells.Value = 1
End Sub


All 16,777,216 were changed to 1.

You may want to be a little more specific.


Dave,
Thank you very much for testing that! That's good info. Did that write all
the cells at once, though? This problem has to do with updating one cell at
a time, and Show-ing each cell after it's updated, as data comes into the
computer one cell-worth at a time. After the 2,560th cell is updated, Excel
pops up a window saying that I've exceeded "2,560 cells or rows".

Joe Czapski
Boston, Mass.




Myrna Larson

2,560 cell limit???
 
Can you post your code?


On Fri, 24 Sep 2004 12:04:08 GMT, "Joseph Czapski" wrote:

"Dave Peterson" wrote:
I don't think so.

This worked for me:

Option Explicit
Sub testme()
ActiveSheet.Cells.Value = 1
End Sub


All 16,777,216 were changed to 1.

You may want to be a little more specific.


Dave,
Thank you very much for testing that! That's good info. Did that write all
the cells at once, though? This problem has to do with updating one cell at
a time, and Show-ing each cell after it's updated, as data comes into the
computer one cell-worth at a time. After the 2,560th cell is updated, Excel
pops up a window saying that I've exceeded "2,560 cells or rows".

Joe Czapski
Boston, Mass.




Joseph Czapski

2,560 cell limit???
 
Can you post your code?

No, sorry. It's in Labview graphical language, all wires and icons, in a
layered hierarchy.

Joe Czapski
Boston, Mass.




Jake Marx[_3_]

2,560 cell limit???
 
Hi Joe,

Joseph Czapski wrote:
Can you post your code?


No, sorry. It's in Labview graphical language, all wires and icons,
in a layered hierarchy.


FWIW, I tested the following code in both XL 2002 & 2003, and I had no
problems. Maybe there's something else you're doing that's causing the
failure at 2560?

Sub test()
Dim xl As Object
Dim wb As Object
Dim l As Long

Set xl = CreateObject("Excel.Application")
Set wb = xl.workbooks.Open("c:\test.xls")

With wb.activesheet
For l = 1 To 10000
.Cells(l, 1).Value = l
Next l
End With

wb.Close True
Set wb = Nothing
xl.Quit
Set xl = Nothing
End Sub

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Myrna Larson

2,560 cell limit???
 
Then maybe it's Labview that is the problem??


On Fri, 24 Sep 2004 20:46:07 GMT, "Joseph Czapski" wrote:

Can you post your code?


No, sorry. It's in Labview graphical language, all wires and icons, in a
layered hierarchy.

Joe Czapski
Boston, Mass.




Joseph Czapski

2,560 cell limit???
 
"Jake Marx" wrote:
....
FWIW, I tested the following code in both XL 2002 & 2003, and I had no
problems. Maybe there's something else you're doing that's causing the
failure at 2560?

Sub test()
Dim xl As Object
Dim wb As Object
Dim l As Long

Set xl = CreateObject("Excel.Application")
Set wb = xl.workbooks.Open("c:\test.xls")

With wb.activesheet
For l = 1 To 10000
.Cells(l, 1).Value = l
Next l
End With

wb.Close True
Set wb = Nothing
xl.Quit
Set xl = Nothing
End Sub


Thank you very much for testing that! That's a relief that that worked. I
wonder if it's a limit on calling the Show method. I'm going to do some
more troubleshooting.

Joe Czapski
Boston, Mass.





All times are GMT +1. The time now is 07:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com