Home |
Search |
Today's Posts |
#1
|
|||
|
|||
update variable
Hi
How can I update a variable by a value of one each time a command button is clicked using macros? Thanks. |
#2
|
|||
|
|||
nc wrote:
Hi How can I update a variable by a value of one each time a command button is clicked using macros? Thanks. --------------------------------- Even easier, rather than a "button" use a "spinner". It's available to you on the same tool bar you'd use to create a "button". It provides a both up and down buttons to increment or decrement a cell. In the properties for the spinner you can define the cell to link it to. No macro required. Good luck... Bill |
#3
|
|||
|
|||
Hi
assuming you mean a cell value by 1 something along the lines of Sub increasevalue() If IsNumeric(Range("A1")) Or IsNull(Range("A1")) Then _ Range("A1").Value = Range("A1").Value + 1 End Sub if this isn't what you've after could you please explain what you mean by a "variable" Cheers JulieD "nc" wrote in message ... Hi How can I update a variable by a value of one each time a command button is clicked using macros? Thanks. |
#4
|
|||
|
|||
Thanks JulieD.
-----Original Message----- Hi assuming you mean a cell value by 1 something along the lines of Sub increasevalue() If IsNumeric(Range("A1")) Or IsNull(Range("A1")) Then _ Range("A1").Value = Range("A1").Value + 1 End Sub if this isn't what you've after could you please explain what you mean by a "variable" Cheers JulieD "nc" wrote in message ... Hi How can I update a variable by a value of one each time a command button is clicked using macros? Thanks. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I Need VBA Assistance for global variable question | Excel Discussion (Misc queries) | |||
Manually update links | Excel Worksheet Functions | |||
Update Automatic Links Not Working in 2003 | Excel Discussion (Misc queries) | |||
Update linked cells within a workbook??? | Links and Linking in Excel | |||
Update Individual Links | Excel Discussion (Misc queries) |