Results 1 to 7 of 7

Using a Form Button to add 1 to a cell each time it is clicked

Threaded View

  1. #1
    Registered User
    Join Date
    06-02-2010
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    96

    Using a Form Button to add 1 to a cell each time it is clicked

    Hi all,

    Ill start with the circumstance. I have a spreadsheet where there are multiple form buttons.
    For this example Ill use one because I beleive I will be able to extrapolate the formula to the others.

    I have one form button named "Small Latte", when it is clicked I would like to add one to the value of cell F4

    Currently I am using the formula
    Sub LatteSmladd1()
    
    Range(F4).Select
    Selection.Value = Selection.Value + 1
    Beep
    
    End Sub

    I get the error: Run-time error '1004': Method 'Range' of object '_Global' failed

    I think its telling me that its empty, F4 has a value of 0 and I want it to stay at 0 until the button is clicked

    Is there anything I can do to get this working?

    I would greatly appreciate any help.

    Cheers
    Last edited by royUK; 08-14-2010 at 02:59 AM. Reason: add code tags

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