+ Reply to Thread
Results 1 to 8 of 8

Monitor a cell through VBA?

  1. #1
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Monitor a cell through VBA?

    Is there any way to continually monitor a given cell for changes? So what I mean is, at first a cell would be blank, but when a user inputs a number into the cell, then any calculation I want on the cell is run. Having a input box prompt would not work well in this case unfortunately.
    Last edited by TomWolowiec; 07-10-2013 at 04:42 PM.

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Monitor a cell through VBA?

    Hi,

    You use a sheet-level code:
    Please Login or Register  to view this content.
    Or workbook-level code (ThisWorkbook):
    Please Login or Register  to view this content.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Monitor a cell through VBA?

    I'm not sure what that's supposed to do. Looks like I have to manually supply the Target range? Or is that taken from a mouse-click or something?

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Monitor a cell through VBA?

    Quote Originally Posted by TomWolowiec View Post
    Is there any way to continually monitor a given cell for changes?
    Yes you can, but you have to tell Excel what that cell is. That will be the 'Target'. So therefore if the 'Target' and the 'Range' you put in the code are the same then something should happen. This is just an example, but your needs may be different.

  5. #5
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Monitor a cell through VBA?

    How do I tell Excel what the cell is?

    I just tried your code where I manually set Target to Range("A1") and it just gave me an error saying "object required". I'm really clueless.

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Monitor a cell through VBA?

    Take a look at the attachment. Change the value of cell A1 and C1 trigger Msgboxes.

    abousetta
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-08-2013
    Location
    Everett, Washington
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Monitor a cell through VBA?

    Okay cool, that works. Thanks. I think I can figure it out from here hopefully.

  8. #8
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Monitor a cell through VBA?

    Glad I could help. PM me if you need further assistance.

    Good luck.

    abousetta

+ 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