Runtime error 91: Objust variable or with block....

P

paritoshmehta

HI,

I have the following code which plots some data which is defined as
name (group_data in the code) to the chart in a sheet as soon as th
sheet is activated:


Private Sub Worksheet_Activate()

'
' Macro4 Macro
' Macro recorded 7/28/2004 by sahu02
' as soon as the sheet is activated, dynamic data range get
plotted!!!

'
ActiveChart.PlotArea.Select
ActiveChart.SetSourceDat
Source:=Sheets("DATA").Range("group_perf"), PlotBy _
:=xlRows



End Sub


This code works absolutely fine but when I save the file with
password to open and modify; and open the file, I get the Error 91..
and it doesnt matter if I open the file as read only or with writ
access....

any help on this will be greatly appreciated!!
 
P

paritoshmehta

I just found out that the error pops up even when the file is not save
with a password.....

till this time everything was fine.... suddenly this error starte
popping up.....

thanks
 
Top