ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Chart & Active Sheet (https://www.excelbanter.com/excel-programming/382798-chart-active-sheet.html)

Ardy

Chart & Active Sheet
 
Hello All:
I am making a chart via code, am having a bit of problem. I am
trying to insert ActiveSheet which should pick the name of the tab but
am getting error"Method Location Of Object Chart Failed".
My Current Code Is:

co.Chart.Location Whe=xlLocationAsObject, Name:="ActiveSheet"

ActiveSheet suppose to insert the tab name, May be I am doing
something wrong. Any suggestion

Regards
Ardy


Ardy

Chart & Active Sheet
 
On Feb 7, 7:52 pm, "Ardy" wrote:
Hello All:
I am making a chart via code, am having a bit of problem. I am
trying to insert ActiveSheet which should pick the name of the tab but
am getting error"Method Location Of Object Chart Failed".
My Current Code Is:

co.Chart.Location Whe=xlLocationAsObject, Name:="ActiveSheet"

ActiveSheet suppose to insert the tab name, May be I am doing
something wrong. Any suggestion

Regards
Ardy


Ops
Got the Syntex
co.Chart.Location Whe=xlLocationAsObject, Name:=ActiveSheet.Name


Jon Peltier

Chart & Active Sheet
 
Post a couple lines of code leading up to this. Are you inserting the chart
object on the active sheet? Then you don't need to change its location to
the active sheet, as it's already there.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Ardy" wrote in message
oups.com...
On Feb 7, 7:52 pm, "Ardy" wrote:
Hello All:
I am making a chart via code, am having a bit of problem. I am
trying to insert ActiveSheet which should pick the name of the tab but
am getting error"Method Location Of Object Chart Failed".
My Current Code Is:

co.Chart.Location Whe=xlLocationAsObject, Name:="ActiveSheet"

ActiveSheet suppose to insert the tab name, May be I am doing
something wrong. Any suggestion

Regards
Ardy


Ops
Got the Syntex
co.Chart.Location Whe=xlLocationAsObject, Name:=ActiveSheet.Name





All times are GMT +1. The time now is 04:22 AM.

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