Formula is too complex to be assigned to object





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 a workaround to this?



2 Replies
best response confirmed by kheldar (Contributor)
I 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

@kheldar In combination with using DocumentID you can use Path Too Long Auto Fixer 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.