[Solved] Pass literal argument to macro from list box event
Posted: Sun Jan 20, 2019 7:05 am
I am calling a macro from a listbox control.
While calling the macro, I'd like to pass a parameter. I would like to pass this value literally from the call.
This means that instead of calling a macro by choosing "MyMacro" from a list, I would call it with “MyMacro(“Sheet2.F1”)”, passing “Sheet2.F1” as a string into the macro.
How is this done? Nowhere that I see in the listbox properties lets me write the name of the macro – I can only select a macro from a list.
I usually look around the internet, find something that asks the same question, then spend a day figuring out what people are typing.
This time I can't even find any examples to stare at. This means it's either incredibly simple or impossible. I hope it's simple.
While calling the macro, I'd like to pass a parameter. I would like to pass this value literally from the call.
This means that instead of calling a macro by choosing "MyMacro" from a list, I would call it with “MyMacro(“Sheet2.F1”)”, passing “Sheet2.F1” as a string into the macro.
How is this done? Nowhere that I see in the listbox properties lets me write the name of the macro – I can only select a macro from a list.
I usually look around the internet, find something that asks the same question, then spend a day figuring out what people are typing.
This time I can't even find any examples to stare at. This means it's either incredibly simple or impossible. I hope it's simple.