Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Creating a button in Macro
I am trying to create a button or check mark so that when a user presses it a
number will appear, but when they 'deselect' the button or check mark that number should become a 0 or a blank cell. I am very new to excel (as you can probably tell) so any help would be amazing. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Creating a button in Macro
Although what you describe is very simple, the fact that you're new to Excel
makes it a little harder. So we'll start out with something slightly different and (maybe) work up to what you're trying to do. So we'll start by creating two macros - one to put the number in the cell and one to clear it out. Later on we can get to the button. The first step is to learn how to create a macro - and the way to start is to record a macro. In Excel 2007 you may need to enable macros first - check the help button (F1) for help on any of these steps. Then you want to record a macro - Excel will record your keystrokes as you create the macro. So to record a macro go to "View - Macros - Record Macro" - give your macro a name (no spaces) and assign a keystroke such as "CTRL I" - this is on the first screen. - then click "OK" Then put the value "1" in cell A1 - hit enter - and then go to "View - Macro - Stop Recording" Now if you erase cell A1 and hit the keystroke combination "CTRL I" a 1 will be put in cell A1. - So that's lesson 1 - create a macro to insert a "1" and create another macro to erase the cell (use a different keystroke combination). So see if you can get that far - then we can start with buttons. "rmann11" wrote: I am trying to create a button or check mark so that when a user presses it a number will appear, but when they 'deselect' the button or check mark that number should become a 0 or a blank cell. I am very new to excel (as you can probably tell) so any help would be amazing. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Creating a button in Macro
Thank you, by the end of yesterday I got that down and started on my journey
to make 10000 buttons kind of like that. But thanks for your response! "dhstein" wrote: Although what you describe is very simple, the fact that you're new to Excel makes it a little harder. So we'll start out with something slightly different and (maybe) work up to what you're trying to do. So we'll start by creating two macros - one to put the number in the cell and one to clear it out. Later on we can get to the button. The first step is to learn how to create a macro - and the way to start is to record a macro. In Excel 2007 you may need to enable macros first - check the help button (F1) for help on any of these steps. Then you want to record a macro - Excel will record your keystrokes as you create the macro. So to record a macro go to "View - Macros - Record Macro" - give your macro a name (no spaces) and assign a keystroke such as "CTRL I" - this is on the first screen. - then click "OK" Then put the value "1" in cell A1 - hit enter - and then go to "View - Macro - Stop Recording" Now if you erase cell A1 and hit the keystroke combination "CTRL I" a 1 will be put in cell A1. - So that's lesson 1 - create a macro to insert a "1" and create another macro to erase the cell (use a different keystroke combination). So see if you can get that far - then we can start with buttons. "rmann11" wrote: I am trying to create a button or check mark so that when a user presses it a number will appear, but when they 'deselect' the button or check mark that number should become a 0 or a blank cell. I am very new to excel (as you can probably tell) so any help would be amazing. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Invalid outside procedure (creating a PDF button as a macro) | Excel Worksheet Functions | |||
Creating a Macro Button to Extract Data | New Users to Excel | |||
Creating a Macro Button to Extract Data | Excel Discussion (Misc queries) | |||
Creating a Macro Button to Extract Data | New Users to Excel | |||
Creating a macro that simulates some of the toolbar button | New Users to Excel |