Excel - adding +8 on a button click

[Closed]
Report
-
 WutUp -
Hello,
How do write a macro for adding a specific number to different cell on a button click. Each Click adds 8 to cell I30 Within the sheet your in.

I thought it would be something like this but it does not work
Range("I30").Range ("I30.I30") + 8

1 reply

Try this.........


Private Sub CommandButton1_Click()

If IsNumeric(Range("I30")) Then

Range("I30") = Range("I30") + 8

Else

MsgBox "You must enter a number in cell I30", vbOKOnly


End If


End Sub
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month