The names of workbooks in Excel 2007 should be limited in size only to memory, but this does not seem to be the case. In the end, the array saved for the name will become so large that when you try to save you get (rephrased): "one or more formulas in this book exceed the limit of 8192 characters, save as a binary file."
OK, and then save it as a binary file ... but even here, the array can become large enough to make the file impossible.
What gives? How are names stored in Excel, what happens? Is this something special to install? Is there any way around this?
Try it yourself using the code below. It will work perfectly, and the name will be filled in correctly, but saving will give you doubtful errors. 3351 elements are too many, but 3350 saves only a fine:
Public Sub TestNameLimits() Dim v As Variant ReDim v(1) Dim index As Integer For index = 1 To 3351 ReDim Preserve v(index) v(index) = "AAAA" Next Call Application.Names.Add("NameLimit", v) End Sub
excel-vba memory excel
notnot Mar 13 '09 at 20:10 2009-03-13 20:10
source share