Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The Range.Formula does not handle formulas that are just below 1024 bytes.
Excel 2000 allows access to these formulas. The code below sets the formula, but then does not allow you to read it out. Is there any reliable way to always get the contents of a formula without throwing this error? Code Sample: Sub Test() Dim s As String s = "='C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 abcdef'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 asdfasdf'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 asdfasc'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 asdfasdfasr'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 asdf'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 asdfasdf'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 aa'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 Aaaa'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 aa'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 aaa'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 aaa'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 aa'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 aaaaaaaa'!#REF!" _ & "+'C:\temp\path1\path2-asdfasdfasdfasdfasdfasd\[file.xls]123 aaaaaaaa'!#REF!" Dim range As range Set range = Sheet1.Cells(1, 1) ' Can set the formula range.formula = s Dim formula As String ' Reading the formula gives an error ' 1004 Application-defined or object-defined error ' Something to do with length of formula? formula = range.formula End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 Formula Error | Excel Discussion (Misc queries) | |||
Word Wrap with 1024 characters Excel 2003 | Excel Discussion (Misc queries) | |||
Error message is Character Limit is over 1024 characters | Excel Discussion (Misc queries) | |||
2003 Excel isn't reading the book.xlt file on startup. | Excel Discussion (Misc queries) | |||
Error when string length 1024 and starts with - | Excel Programming |