mhblake
08-28-2012, 10:29 AM
Hi all-
I'm trying to create (record) a macro that will run a formula. In essence, I have toggle switches to change values, and I also created a 'reset' button to re-set the values to what they previously were.
I got the macro to record (the formula is " = [cell]" to change the value back to what it was), but I'm experiencing a problem where if you have a random cell selected when you click the 'reset' button, the macro may - or may not - enter values in those random cells.
I'm developing this spreadsheet as an illustration for c-suite executives, and I'd rather have this as clean as possible. I do have all the other cells locked and the sheet protected to prevent errors, but this continues to happen.
Also, 'relative references' is turned off when I'm recording. Any ideas? Anything I can plug into the macro/VBA to allow it to modify only the selected cells?
Thanks!
(PS I'm running excel 2007)
I'm trying to create (record) a macro that will run a formula. In essence, I have toggle switches to change values, and I also created a 'reset' button to re-set the values to what they previously were.
I got the macro to record (the formula is " = [cell]" to change the value back to what it was), but I'm experiencing a problem where if you have a random cell selected when you click the 'reset' button, the macro may - or may not - enter values in those random cells.
I'm developing this spreadsheet as an illustration for c-suite executives, and I'd rather have this as clean as possible. I do have all the other cells locked and the sheet protected to prevent errors, but this continues to happen.
Also, 'relative references' is turned off when I'm recording. Any ideas? Anything I can plug into the macro/VBA to allow it to modify only the selected cells?
Thanks!
(PS I'm running excel 2007)