odedyer
Oct 21st, 2004, 03:23 AM
I have several CommandButtons on the worksheet and I want each one to do the same action, but on a different range of cells. Is there a way to assign each CommandButton with the same procedure, so that every time you press it the procedure will do whatever it does but on the right range of cells?
Maybe assign it with a procedure that has arguments?
Maybe you can do it if the procedure "knows" (maybe gets a handler or something) which button called it and then from the button's name or something it can decide which range to work on...?
Any other ideas (except for selecting the range and let the procedure work on "ActiveSheet.selection")?
Maybe assign it with a procedure that has arguments?
Maybe you can do it if the procedure "knows" (maybe gets a handler or something) which button called it and then from the button's name or something it can decide which range to work on...?
Any other ideas (except for selecting the range and let the procedure work on "ActiveSheet.selection")?