Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Location
    Chicago, IL
    Posts
    5

    Unanswered: Calling a VBA function on a change to a cell

    Being fairly new to Visual Basic, especially in an Excel environment, I had a (hopefully) quick question about calling VBA functions. I have tried googling for the needed information, but I just can't find that right set of keywords to get the info I need.

    Anyhow, I have a VBA function that I would like to call anytime a change is made to a particular set of cells. At the moment, I have the function set to a button that will execute the function when pressed, but I would like to make the changes more seamless and transparent. I would assume that there is some way to implicity call this function whenever a value in a cell is changed, but I just can't seem to find the function to do this.

    I realize that doing this causes a large amount of overhead, but the code I would like to execute is quite small and shouldn't cause too much of an issue. Using conditionals is out, since I have more conditions that would be supported.

    If anyone can point me in the right direction, it would be greatly appreciated.

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Worksheet_change event of the worksheet class

    i.e. view the code of the worksheet you are looking at then choose the options from the drop down list

  3. #3
    Join Date
    Mar 2005
    Location
    Chicago, IL
    Posts
    5
    Excellent, thats just what I was looking for! Thanks!

Posting Permissions

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