VBA: Error using string variable with .SeriesCollection()

784 views Asked by At

When I use the following code, I get: Run-time error '13': Type mismatch

Dim SeriesName as String
.
.
SeriesName = "Minor_Milestones"
.
.
.
   With .SeriesCollection(SeriesName).Points(ThisPoint)
      .
      .

However, if I change the one line to:

   With .SeriesCollection("Minor_Milestones").Points(ThisPoint)
      .
      .

it works fine. Feel like I'm making a newbie mistake, but can't find it!

0

There are 0 answers