Ask Your Question

mathematicool's profile - activity

2016-02-20 08:08:18 +0100 received badge  Famous Question (source)
2014-03-25 12:11:46 +0100 received badge  Notable Question (source)
2014-03-14 23:15:53 +0100 received badge  Popular Question (source)
2014-03-14 05:44:35 +0100 commented answer [Calc] How to start a macro with user-specified parameters?

Unfortunately not. It only says how to call macros with parameters from within other macros. I basically just need to find some way of user specified input to the macro.

2014-03-14 02:10:26 +0100 asked a question [Calc] How to start a macro with user-specified parameters?

Hi,

Got a Calc question:

I've just started creating macros and I was wondering how you can run a macro with parameters.

For instance, I have created a macro which copies a cell into a specific column and the parameter of the macro is a reference to the cell you wish to copy. Now I have created some buttons and I want it so that when I click a button a cell specific to each button is copied, e.g. if I click button 1 then A1 is copied, button 2 then C4 is copied. However, I can't find a way to assign the macro to the buttons and pass a parameter (i.e. the cell) to the macro. Currently, the only way I can see to do this is to create a separate macro for each and every button (which would take a lot of time) and each macro would then call the copy macro with the correct parameters. Is there a better way to do this.

Thanks in advance.