Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default 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.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default 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]

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default 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.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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.



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
Limit Cell Content Bob Zimmerman Excel Worksheet Functions 4 May 14th 10 06:43 PM
cell character limit keenah Excel Discussion (Misc queries) 8 November 24th 09 05:58 PM
How can I set a limit in a cell Kim Excel Worksheet Functions 9 February 26th 09 03:42 PM
Can I limit a cell to 2 characters? Frankc Excel Discussion (Misc queries) 2 August 11th 05 01:03 AM
Nested IF limit or Open parentheses limit Fred Excel Discussion (Misc queries) 5 December 23rd 04 03:34 PM


All times are GMT +1. The time now is 05:01 AM.

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"