N8theGreat
New Member
- Joined
- Jan 18, 2011
- Messages
- 38
I have a script in a module which defines the data in the chart as well as the X and Y axis.
In the module:
In the sheet I have the following script:
Private Sub Worksheet_Change(ByVal Target As Range)
When the module script runs and changes the value of "T20", the worksheet script runs and errors with Runtime error '-2147024809 (80070057)' "The item with the specified name wasn't found."
Why am I getting this error?
In the module:
Code:
Sheets(she).Cells(14, 20) = Int(tn - 10)
Private Sub Worksheet_Change(ByVal Target As Range)
Code:
Select Case Target.Address
Case "$T$12"
ActiveSheet.ChartObjects("Chart 2").Chart.Axes(xlCategory).MaximumScale = Target.Value
ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory).MaximumScale = Target.Value
ActiveSheet.ChartObjects("Chart 3").Chart.Axes(xlCategory).MaximumScale = Target.Value
End Select
End Sub
When the module script runs and changes the value of "T20", the worksheet script runs and errors with Runtime error '-2147024809 (80070057)' "The item with the specified name wasn't found."
Why am I getting this error?