Computing.Net > Forums > Office Software > Click to add points in Excel

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Click to add points in Excel

Reply to Message Icon

Name: tomm3696
Date: July 24, 2009 at 06:32:19 Pacific
OS: Windows XP Pro
Product: Microsoft Excel 2007
Subcategory: Microsoft Office
Comment:

I am using Excel 2007 and would like to add a button that when clicked will add a numeric value of 1 in a seperate field. The idea is if my kids are good, we can click the button to add a point and another button to subtract a point. Please help.



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: July 26, 2009 at 18:33:42 Pacific
Reply:

Although the thought of disciplining a child with an Excel spreadsheet is somewhat disturbing, at least to me, these 2 pieces of code will add or subtract 1 from whatever is in A1.

Sub GoodKid()
 Range("A1") = Range("A1") + 1
End Sub

Sub BadKid()
 Range("A1") = Range("A1") - 1
End Sub

Right click a sheet tab, choose view code and paste this code into the window that opens.

You can then insert any picture, shape or clip art into your sheet and then right click it and choose Assign Macro. Assign one of these two macros to each button and you're done.

How about of picture of your kid laughing for the GoodKid macro and one of the kid crying for the BadKid code? That shouldn't leave any permanent scars.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Click to add points in Excel

Drag point in Excel 2007 www.computing.net/answers/office/drag-point-in-excel-2007/7523.html

Excel forumula to add a month www.computing.net/answers/office/excel-forumula-to-add-a-month/6489.html

Move to specific page in excel work www.computing.net/answers/office/move-to-specific-page-in-excel-work/4910.html