i need to be able to make a cell increase its value by 1 every time i press a button - how can i do this - please help
i need help with cells and vba
-
-
-
is it always the same cell ?
ie cell Z20
or can it be any cell when the button is pressed ?
-
Cheap and easy for a static cell range
Private Sub CommandButton1_Click()
Range("A1").Value = Range("A1").Value + 1
End Sub -
Nothing wrong with the Range Statements but also consider using
Cells (1,1) = Cells (1,1)+1
now you can use variables in place of the ones to move you output . I find Range a little limited sometimes.
You can use a form button assigned to the macro.
Sub test()
Cells(1, 1) = Cells(1, 1) + 1
End Sub -
Hi Anonymous
Along a different line, you might be able to use a SpinButton from the Forms Toolbar (no VBA needed), or from the Control Toolbox Toolbar.
-
Hi in line with Daves suggestion does this give you some help
Jack in the UK
Click ok to Macros not really any as such
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!