problem with macro

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BMGengineer
    New Member
    • Jul 2006
    • 1

    problem with macro

    I need some help with a macro I wrote. The macro gives me an error the first time I run it after opening the workbook, but works perfectly every time after that.

    This is the line that gives me an error:
    ActiveChart.Loc ation Where:=xlLocati onAsNewSheet, Name:="Chart" & n

    I think it has something to do with the "n" variable not being initialized in the for loop the first time around. But I'm not an expert with this stuff so I am really just guessing.

    Any help would be GREATLY appreciated.
Working...