Cannot assign a macro to a button using simple shape – too complex to be assigned to object – Solved
I have this working in another workbook, in fact I copied that worksheet to this workbook. Since copying can carry the original workbook in some of the formulas (not all it seems), I right-clicked on my button (rectangle shape) to assign the macro, chose the macro from the list and received an error, ‘formula is too complex to be assigned to object’.
I passed this issue through ChatGPT and followed its suggestions for error checking.
I can run the macro on it’s own successfully, just can’t assign it to a button or any other of the macros for that matter. I have rebooted the laptop as well, no difference. Macros are enabled.
The filename for this workbook is: “C:Usersed.hickeyOneDrive – xxxxxxxx xxxxDocumentsEdsStuffxxxxxxxxx-xxxxxxxxxxxxxxxxxxx-xxxxxxxOrderingSpreadsheetsProductionReady1)xxxxxxxPredesignedBouquetProductLoadV7_20240719_IDWeddingBaby_33xxxxxxxx.xlsm”. The total length is 220 characters which is under the 260 char max for SharePoint. I changed the filename to a simple name of testv7.xlsm and it worked. It seems to be either length or a special character. My understanding is square brackets can cause this issue.
After reducing the length, the issue resolved itself. By taking one character from the filename, the problem is resolved.
These samples is creating a button and assigning it fresh – same result
after selecting the correct macro
and choose OK
I have this working in another workbook, in fact I copied that worksheet to this workbook. Since copying can carry the original workbook in some of the formulas (not all it seems), I right-clicked on my button (rectangle shape) to assign the macro, chose the macro from the list and received an error, ‘formula is too complex to be assigned to object’. I passed this issue through ChatGPT and followed its suggestions for error checking. I can run the macro on it’s own successfully, just can’t assign it to a button or any other of the macros for that matter. I have rebooted the laptop as well, no difference. Macros are enabled. The filename for this workbook is: “C:Usersed.hickeyOneDrive – xxxxxxxx xxxxDocumentsEdsStuffxxxxxxxxx-xxxxxxxxxxxxxxxxxxx-xxxxxxxOrderingSpreadsheetsProductionReady1)xxxxxxxPredesignedBouquetProductLoadV7_20240719_IDWeddingBaby_33xxxxxxxx.xlsm”. The total length is 220 characters which is under the 260 char max for SharePoint. I changed the filename to a simple name of testv7.xlsm and it worked. It seems to be either length or a special character. My understanding is square brackets can cause this issue. After reducing the length, the issue resolved itself. By taking one character from the filename, the problem is resolved. These samples is creating a button and assigning it fresh – same resultafter selecting the correct macroand choose OK Read More