LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 331
Default Modified vb - but it won't work

I am trying to modifiy an existing routine but can't get it to work.


Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Long
Dim l As Long

If Target.Count 1 Then Exit Sub
If Target.Address = "$C$16" Then
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
r = Cells(Rows.Count, 1).End(xlUp).Row
If Target.Value = Sheets("Lists").Range("$A$1").Value Then
Sheets("Lists").Range("$C$2").Value = ""
Else
Sheets("Lists").Range("$C$2").Value = Target.Value
End If

Range("$a20:$P" & r).AdvancedFilter Action:=xlFilterInPlace, _
criteriaRange:=Sheets("Lists").Range("$C$1:$C$2"), Unique:=False
End If

I'm using this in another workbook. The target address is "B2" on worksheet
"code activity". "B1:B2" is my range and the filter column begins at "A10".
Isn't it as simple as substituting this out? I'm guessing my problem is
this new workbook has everything on one worksheet and the original workbook
is checking two worksheets to get the info. I have this booogered up! Any
help?
Thanks,
Greg
 
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
modified vlookup help tjb Excel Worksheet Functions 5 November 19th 09 06:10 PM
Last Modified by... WJvanRooijen Excel Discussion (Misc queries) 4 September 1st 06 07:27 PM
Last Modified Steve Excel Worksheet Functions 1 July 20th 06 06:30 PM
<HELP modified reference referrrrrr Excel Worksheet Functions 1 June 12th 06 06:04 PM
Modified Excel?????? WomensHealthUSA Excel Discussion (Misc queries) 1 June 8th 05 09:27 PM


All times are GMT +1. The time now is 05:44 PM.

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

About Us

"It's about Microsoft Excel"