Results 1 to 17 of 17

Simple Cell Value +1 macro

Threaded View

  1. #1
    Registered User
    Join Date
    01-24-2010
    Location
    Vientiane, Laos
    MS-Off Ver
    Excel 2003
    Posts
    11

    Simple Cell Value +1 macro

    Hello,

    I'm trying to write a basic macro which will increase the value in a cell by 1 when I click on the button I've made. I've searched for hours on the Internet, including this site, and found several websites which give a formula needed but none of them work, I always get an "Object variable not set" error or something about sub-functions which I can't recreate so I can't give the full error message. Sorry.

    Based on what I've seen on the Internet, I currently have:

     REM  *****  BASIC  *****
    
    Sub WebsitePlus
    ActiveSheet.Range("B18") = ActiveSheet.Range("B18") + 1
    End Sub
    Where B18 is the cell which currently says 0 and I want to go up by one every time I click the button.

    In this macro, the B18 and the 1 are highlighted in red, presumably meaning they're the bits that are wrong. I get a "Basic runtime error: Object variable not set" error when I run it.

    Thanks in advance for any help.
    Last edited by Barns; 01-24-2010 at 06:31 AM.

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