Hi Frank,
Based on my test below, I think it is caused by the limitation of formula
property.
Sub test()
Dim s As String
Dim i As Integer
s = "=11111"
For i = 1 To 448
s = s + "+" + CStr(1)
Next
Debug.Print Len(s)
Dim rg As Range
Set rg = Cells(1, 1)
rg.Formula = s
Debug.Print rg.Formula
End Sub
If we change the s = "=11111" to s = "=111111"
the error " 1004 Application-defined or object-defined error" will occur in
the line below.
rg.Formula = s
You may have a try and let me know the result.
Also why you need such a long string formular?
Do you have any concern, maybe we can do that in another way?
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.