Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can anyone give me any ideas why the first script is making the second not
work? The second runs fine until I run the first then the second no longer works. 1st****** Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit Application.EnableEvents = False If Target.Row = 3 And Target.Column = 3 Then 'calculate criteria cell in case calculation mode is manual Worksheets("ProduceData").Range("s3").Calculate Worksheets("ProduceData").Range("Database") _ .AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=Sheets("ProduceData").Range("s2:s3" ), _ CopyToRange:=Range("a7:g7"), Unique:=False Me.Range("c4").ClearContents End If ws_exit: Application.EnableEvents = True End Sub 2nd****** Sub UpdateInvoiceList() ' ' UpdateInvoiceList Macro ' Macro created by 4/27/2005 by Jennifer S. Klever With Worksheets("ProduceData") Application.EnableEvents = False ..Range("Invoice").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=.Range( _ "r2"), Unique:=True ..Range("InvoiceList").Sort Key1:=Sheets("ProduceData").Range("r3") ..Range("DatabaseSort").Sort Key1:=.Range("B1"), Order1:=xlAscending, Key2:=.Range("C1"), Order2:=xlAscending, Header:=xlGuess End With Worksheets("Switchboard").Activate End Sub -- Though daily learning, I LOVE EXCEL! Jennifer |