Re Worksheet Change Issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have some code using Worksheet_Change so when the user changes a cell
value, it runs the CopyFilterData5 macro. I have another cell on the
worksheet that's driven from a VLOOKUP table...when the value of the cell
changes, I want to run the macro also. I tried putting the cell location in
(i.e. E26,A2 but it won't trigger it. It appears that the Worksheet_Change
only works if a cell is manually changed. Any ideas? Thanks

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E26")) Is Nothing Then
Sheets("Entry").Select
Application.Run "CopyFilterData5"
End If
End Sub
 
Depending on what the user is allowed to change, you might be able to change
your formulas as follows:

Say E26=VLOOKUP(A1,MyTable,3,False)

Then in the event code:
If Not Intersect(Target,Range("A1")) Is Nothing then

or

If Not Intersect(Target,Range("MyTable").Columns(3)) Is Nothing then

If the user has full access this won't cover all possibilities.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top