Forum Discussion
kheldar
Nov 07, 2021Iron Contributor
Formula is too complex to be assigned to object
Hello, I can't run neither assign a macro to the object. I've figured it's because of the long file path. However, the files are on Sharepoint and folders need have long file paths. Is there...
- Dec 26, 2021I found out the solution to this.
This error can be caused by the name of the folder (or previous folder) where the xls-file is located in...
When the foldername (or name of a previous folder) contains the character "[" and/or "]", you get this error.
For example when your xls-file is located in
"C:\XLS-files\] Test\bladibla.xls" or "C:\] XLS-files\Test\bladibla.xls"),
you will get the 'Formula is too complex to be assigned to object'-error.
By the way: Other special characters in foldernames (like "+", "(" and "{") won't cause that problem.
You like to maintain your foldername?!
In that case you:
-> move the xls-file to "C:\" (e.g. "C:\bladibla.xls")
-> open bladibla.xls
-> add the macro's to the buttons
-> save & close the xls-file
-> move back the xls-file to your desired location (e.g. "C:\] XLS-files\Test\bladibla.xls")
It works for me... hope it works for you too
MarkPahulje
Jan 12, 2022Brass Contributor
kheldar In combination with using DocumentID you can use https://pathtoolongautofixer.blogspot.com/ tool that discovers, reports and auto corrects filenames and paths that are too long to fit under the Window's MAXPATH 260 character limit for SharePoint.