ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Runtime error 91: Objust variable or with block.... (https://www.excelbanter.com/excel-programming/305429-runtime-error-91-objust-variable-block.html)

paritoshmehta[_23_]

Runtime error 91: Objust variable or with block....
 
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!!

--
Message posted from http://www.ExcelForum.com


paritoshmehta[_24_]

Runtime error 91: Objust variable or with block....
 
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

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 08:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com