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
kheldar
Dec 26, 2021Iron 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
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
Wendy_W1
Feb 18, 2025Copper Contributor
Thank you so very much for this solution.
Am doing a Cert IV in Accounting and Bookkeeping and was going around the bend trying to work out the reason I was unable to attach a macros to a form control button.
You're an absolute boomer and I love you.....😀