View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
JBeaucaire[_86_] JBeaucaire[_86_] is offline
external usenet poster
 
Posts: 1
Default a button to add 1 to a cell


To keep from needing 150 macros, just use 3. Here are your macros, put
them into your sheet first.

Code:
--------------------
Sub Add1()
Selection.Value = Selection.Value + 1
Beep
End Sub

Sub Add5()
Selection.Value = Selection.Value + 5
Beep
End Sub

Sub Add10()
Selection.Value = Selection.Value + 10
Beep
End Sub

--------------------
Now turn on the Forms Toolbar, draw a button and select Add1 macro. Draw
another and select Add5, and the third uses Add10. Edit the text on the
buttons.

Now, the buttons will add the values noted to the currently selected
cell. If you don't like the "beeps" delete them, I thought the audible
confirmation the macro ran and the number was added was a good thing in
this situation.


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=49195