+ Reply to Thread
Results 1 to 4 of 4

VBA Code to add numbers when a button is clicked

  1. #1
    Registered User
    Join Date
    06-14-2012
    Location
    Ames, Iowa
    MS-Off Ver
    Excel 2010
    Posts
    50

    VBA Code to add numbers when a button is clicked

    I am not very good with writing VBA code so I'm looking for some help.

    I want to have a button in an Excel document (using a Macros) that when the user clicks the button, it adds 6 to a certain cell (F5). Then each time it is clicked, it keeps a running total.

    Is there any simple code that can do this for me?
    Thanks for your help!

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: VBA Code to add numbers when a button is clicked

    ISUCyclones,

    Welcome to the forum!
    Something like this should work for you:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    06-14-2012
    Location
    Ames, Iowa
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: VBA Code to add numbers when a button is clicked

    That works perfect for what I need. Thanks for your help Tigeravatar!

  4. #4
    Registered User
    Join Date
    05-08-2012
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: VBA Code to add numbers when a button is clicked

    This should work and to add a keyboard shortcut to your macro go to options enter your shortcut then click ok.

    Please Login or Register  to view this content.
    Any time you click that shortcut it should repeat the operation

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1