Forum Discussion

kheldar's avatar
kheldar
Iron Contributor
Nov 07, 2021
Solved

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...
  • kheldar's avatar
    Dec 26, 2021
    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

Resources