J
Jennifer
Ok let me say i fully understand how to name a range and in the source data
for a chart you use the formula =sheetname!rangename
Problem arrises when my macro that runs an advanced filter with the source
data and add data to the bottom of the range the chart reverts back to it's
initial data source =sheet1!$a$4:$b$15
so even though it accept the named range intitailly once the advanced filter
runs it ommits the named range. I am using 2007 and i never had this
problem in 2003.
What suggestions do you have for me? At the bottom you will see my code.
Thank you!!!!!
--
Thank you,
Jennifer
--
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
''ActiveSheet.Unprotect
'On Error GoTo ws_exit
'Application.EnableEvents = False
'If Target.Row = 3 And Target.Column = 2 Then
''calculate criteria cell in case calculation mode is manual
' Worksheets("TankInventory").Range("ac2:ad2").Calculate
' Worksheets("TankInventory").Range("Inventory_PivotTable") _
' .AdvancedFilter Action:=xlFilterCopy, _
' CriteriaRange:=Sheets("TankInventory").Range("ac1:ad2"), _
' CopyToRange:=Range("a6:b6"), Unique:=False
' Me.Range("B3").Select
'End If
'ws_exit:
' Application.EnableEvents = True
' 'ActiveSheet.Protect
for a chart you use the formula =sheetname!rangename
Problem arrises when my macro that runs an advanced filter with the source
data and add data to the bottom of the range the chart reverts back to it's
initial data source =sheet1!$a$4:$b$15
so even though it accept the named range intitailly once the advanced filter
runs it ommits the named range. I am using 2007 and i never had this
problem in 2003.
What suggestions do you have for me? At the bottom you will see my code.
Thank you!!!!!
--
Thank you,
Jennifer
--
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
''ActiveSheet.Unprotect
'On Error GoTo ws_exit
'Application.EnableEvents = False
'If Target.Row = 3 And Target.Column = 2 Then
''calculate criteria cell in case calculation mode is manual
' Worksheets("TankInventory").Range("ac2:ad2").Calculate
' Worksheets("TankInventory").Range("Inventory_PivotTable") _
' .AdvancedFilter Action:=xlFilterCopy, _
' CriteriaRange:=Sheets("TankInventory").Range("ac1:ad2"), _
' CopyToRange:=Range("a6:b6"), Unique:=False
' Me.Range("B3").Select
'End If
'ws_exit:
' Application.EnableEvents = True
' 'ActiveSheet.Protect