Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

I'm trying to create a Macro that animates a chart to flick through each set of data, I keep getting errors on selecting the chart

I'm trying to create a Macro that animates a chart to flick through each set of data, I keep getting errors on selecting the chart series (line 5)

Sub Chart1()

Application.ScreenUpdating = False

Worksheets("TR01db.vel").Activate

Worksheets("TR01db.vel").Activate Worksheets("TR01db.vel").ChartObjects("Chart 1").SeriesCollection(1).XValues = Worksheets("TR01db.vel").Range(Cells(4, 1), Cells(1000, 1)) Worksheets("TR01db.vel").ChartObjects("Chart 1").SeriesCollection(1).Values = Worksheets("TR01db.vel").Range(Cells(4, 2), Cells(1000, 2)) Application.ScreenUpdating = True

For k = 0 To 100 Worksheets("TR01db.vel").ChartObjects(1).SeriesCollection(1).XValues = Worksheets("TR01db.vel").Range(Cells(4, 1), Cells(1000, 1)) Worksheets("TR01db.vel").ChartObjects(1).SeriesCollection(1).Values = Worksheets("TR01db.vel").Range(Cells(4, 2 + k), Cells(1000, 2 + k)) Next k

BeforeExit: Set rValues = Nothing Set rCell = Nothing

Exit Sub ErrorHandle: MsgBox Err.Description & " Procedure Chart1" Resume BeforeExit End Sub

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions