I am writing a program that executes a macro after pressing a button.
The code depends on the selection of the drop down box, however I do not want to run any macros after changing the drop down box.
I get this message:
Cannot run the macro "Test.xlsm'!DropDown22_Change" The macro may not be available in this workbook or all macros may be disabled.
How can I disable this attempt to run a macro after I change the selection?
Assign Macro. If it shows something in theMacro name:field, delete it, then press OK. - YowE3KAssign Macrowhen you right-click on it, see if it has aView Codeoption. - YowE3KCell Link? If so, see stackoverflow.com/q/9578038/6535336 (e.g.ThisWorkbook.Sheets("Sheet1").Shapes("Drop Down 22").oleformat.object.list(ThisWorkbook.Sheets("Sheet1").Shapes("Drop Down 22").oleformat.object.listindex)). If you have assigned the cell link, just access the cell (e.g.ThisWorkbook.Sheets("Sheet1").Range("B2").Valueif you linked to cell B2) which will give the index - if"Option 1"is the first item in the list, the linked cell will contain1. - YowE3K