Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Re Worksheet Change Issue

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Re Worksheet Change Issue

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.


"DocuMike" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Active Cell? = Iteration / Maximum Change Issue Mark_S Excel Discussion (Misc queries) 0 November 23rd 10 01:09 AM
Excel Worksheet Password Issue!!!!! nitro Excel Discussion (Misc queries) 2 June 29th 07 10:42 AM
Help with Worksheet issue Scott W Excel Worksheet Functions 4 March 14th 06 08:58 PM
Referencing worksheet issue Keven Jeffery Excel Discussion (Misc queries) 1 December 20th 05 04:58 PM
worksheet collection issue Mark Kubicki Excel Programming 2 November 18th 03 02:44 AM


All times are GMT +1. The time now is 10:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"