Excel - adding +8 on a button click

Closed
jubu - Jan 20, 2010 at 02:51 PM
 WutUp - Jan 20, 2010 at 09:19 PM
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