[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VBA : Get contents of cell changed

Posted on 2012-03-23
2
Medium Priority
?
378 Views
Last Modified: 2012-03-29
I'm using the Worksheet Change events to detect changes to cells.

I need to pass in the contents of the cell changed if the column is the third column.

What's the best way to do this?

Lee
0
Comment
Question by:lee_jd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 37756495
Do you mean the contents before the change or after?
0
 
LVL 19

Accepted Solution

by:
regmigrant earned 2000 total points
ID: 37756920
Assuming you are looking at the content after the change, and you're not interested in changes as the result of a recalculation of the sheet then this example might help.

Its taken from the excel help for 'worsheet.change' and its easy to see how to get it to work with column 3

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Target.Column = 3 Then
        ThisRow = Target.Row
         
        Target.value  holds the new value of the cell

    End If
End Sub

If you need something more complex then an example would help
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question