David
It is surely telling you that the ActiveChart object does not have a Parent ?
As the line with ActiveChart.Location did not fail, the ActiveChart therefore exists but does not necessarily have a ChartObject as a parent.
Set a Watch on ActiveChart and examine its properties to confirm this.
Not knowing about the rest of the code I am puzzled about what Set ChtOb = ActiveChart.Parent is trying to do. Please explain.
Regards
Derek Turner +++
From: "who1012000@yahoo.com [ExcelVBA]" <ExcelVBA@yahoogroups.com>
To: ExcelVBA@yahoogroups.com
Sent: Sunday, 13 July 2014, 21:22
Subject: [ExcelVBA] Set ChtOb = ActiveChart.Parent
Hello,This line of code:Set ChtOb = ActiveChart.ParentCreates "Run-time error 91" "Object variable or with block variable not set", but it does not do it all of the time. Below are lines that precede the code. I think something has to be reset, because if I get out of Excel and reboot the goes away. Any ideas? Thanks in advance, DavidActiveChart.Location Where:=xlLocationAsObject, Name:=ThisSheetDim RngToCover As RangeDim ChtOb As ChartObjectSet RngToCover = ActiveSheet.Range("I7:W37")
__._,_.___
Posted by: Derek Turner <g4swy@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar