passing a parameter to an excel macro from a form control

S

Sian

Has anyone managed to pass a parameter to a macro from a form checkbox using
'Assign Macros'?
Alternatively, can I reference the control that called the macro in the
macro code, without knowing its name? (as in 'me.' or something like that)
I want several controls to run the same macro passing it one parameter.
Size limitations (plus sloppy design!) precluse me from repeating the macro.
I much prefer to use form controls in this instance as I'm copying them
programmatically.
 
M

Matthew Pfluger

If it is really necessary to use a Form checkbox instead of a Controls check
box (which would allow you to use its properties), you could make an
intermediate macro. Instead of having the checkbox call the macro that needs
a parameter, write a quick macro that calls the other macro and passes a
parameter to it. This would also allow you to reference the control (or the
macro) that called the main macro.

HTH,
Matthew Pfluger
 
S

Sian

Thank you Matthew, that was helpful - that did occur to me but I thought I
might be missing something. I think I'll find another approach altogether...!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top