![]() |
Silly Excel Question - VBA may be necessary
So... my boss wants me to add a little sumthin to an excel spreadsheet he has. It's a very simple table, and he wants a button that he clicks and it clears the fields of the table. I know, this is stupid. You could simply highlight them all and press delete. But it's all about pleasing the boss. Can someone point me in the right direction to find a tutorial on how to do this? Or perhaps post an example? Thanks guys.
I also realize I could use a macro, I'll use this if I have trouble creating a pretty delete button for him. |
Clear cells in excel? - Yahoo! Answers
Clear Button - Excel Help Forum You will have to name the table range, record a macro of you clearing it, and then map the macro to a pretty delete button. |
Thanks for the quick reply Zergrinch. That works perfectly... on Excel 2007. Unfortunately at my office we have 2003, and I got the macro to work just fine with a hotkey, but assigning it to a button I haven't been able to figure out yet.
EDIT: Okay, I found that when I insert a shape, I can assign a macro to it, but when it's a button I have trouble. No problem though, I can make a shape look just like a button :P I'd still like to know how to assign one to a button out of curiousity. EDIT #2: Well I decided to copy the code from a macro into the code of the button, which worked just fine. I guess there isn't a way to just assign a macro to a button in 2003 like there is in 2007. |
| All times are GMT -5. The time now is 02:16 PM. |
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2026, vBulletin Solutions, Inc.