Add on mouse click

M

MARSHALL MOONEY

Does anyone know a way to make Excel add a value to a total when the mouse clicks on an object?
I am trying to make a scoring table for PowerPoint. I can embed the table, but no luck with the function.
 
O

Otto Moehrbach

I don't know what you mean when you say an object. But you can use a
Worksheet_SelectionChange event macro to do what you want when you click on
a cell. Is that what you had in mind? HTH Otto

Does anyone know a way to make Excel add a value to a total when the mouse
clicks on an object?
I am trying to make a scoring table for PowerPoint. I can embed the table,
but no luck with the function.
 
M

MARSHALL MOONEY

Good question. I wanted to create a scoring mechanism that would add a
certain number of point to a teams score when I click on something. It
really does not matter to me what that is. I wanted to put something in the
PowerPoint slide to click on that would update the score.
Thanks for trying to help...
 
G

Gary''s Student

The easiest thing to click is a button. Here is a demo:

Sub button_maker()
Application.CommandBars("Forms").Visible = True
ActiveSheet.Buttons.Add(94.5, 75.75, 51, 27.75).Select
Selection.OnAction = "mooney"
ActiveSheet.Shapes(1).Select
Selection.Characters.Text = "Bump"
Application.CommandBars("Forms").Visible = False
End Sub

Sub mooney()
Range("A1").Value = Range("A1").Value + 3
End Sub

button_maker creats a button. Once it has been run, you don't need to run
it again on that worksheet. The second macro runs whenever the button is
clicked. The second macro increments the value in cell A1 by 3.
 
Top