Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am unable to set the Location of a ChartObject using Excel 2003, VB 6.3.
The following code will return either Error 1004 or Run-time error '438': Object doesn't support this property or method. ActiveChart.Location Whe=xlLocationAsNewSheet, Name:="Test" However ActiveChart seems to be valid because immediately before (or after if the .Location line is commented out) other properties can be changed, e.g.: ActiveChart.Axes(xlValue, xlSecondary).MaximumScale = 0.6 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As a guess, you already have a chart sheet named "Test".
If so you'll need to rename that one, or delete it, or apply a different name for your new chart sheet. Regards, Peter T "Dave Booker" wrote in message ... I am unable to set the Location of a ChartObject using Excel 2003, VB 6.3. The following code will return either Error 1004 or Run-time error '438': Object doesn't support this property or method. ActiveChart.Location Whe=xlLocationAsNewSheet, Name:="Test" However ActiveChart seems to be valid because immediately before (or after if the .Location line is commented out) other properties can be changed, e.g.: ActiveChart.Axes(xlValue, xlSecondary).MaximumScale = 0.6 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nope... no objects named "Test" in the workbook.
"Peter T" wrote: As a guess, you already have a chart sheet named "Test". If so you'll need to rename that one, or delete it, or apply a different name for your new chart sheet. Regards, Peter T "Dave Booker" wrote in message ... I am unable to set the Location of a ChartObject using Excel 2003, VB 6.3. The following code will return either Error 1004 or Run-time error '438': Object doesn't support this property or method. ActiveChart.Location Whe=xlLocationAsNewSheet, Name:="Test" However ActiveChart seems to be valid because immediately before (or after if the .Location line is commented out) other properties can be changed, e.g.: ActiveChart.Axes(xlValue, xlSecondary).MaximumScale = 0.6 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Manually select your chart, just to be sure, and in your code change
Name:="Test" to Name:="UniqueName" Regards, Peter T "Dave Booker" wrote in message ... Nope... no objects named "Test" in the workbook. "Peter T" wrote: As a guess, you already have a chart sheet named "Test". If so you'll need to rename that one, or delete it, or apply a different name for your new chart sheet. Regards, Peter T "Dave Booker" wrote in message ... I am unable to set the Location of a ChartObject using Excel 2003, VB 6.3. The following code will return either Error 1004 or Run-time error '438': Object doesn't support this property or method. ActiveChart.Location Whe=xlLocationAsNewSheet, Name:="Test" However ActiveChart seems to be valid because immediately before (or after if the .Location line is commented out) other properties can be changed, e.g.: ActiveChart.Axes(xlValue, xlSecondary).MaximumScale = 0.6 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tried that -- single-line macro that just calls the .Location method with
Whe=xlLocationAsNewSheet, Name:="UniqueName" That still fails with error 438. "Peter T" wrote: Manually select your chart, just to be sure, and in your code change Name:="Test" to Name:="UniqueName" Regards, Peter T "Dave Booker" wrote in message ... Nope... no objects named "Test" in the workbook. "Peter T" wrote: As a guess, you already have a chart sheet named "Test". If so you'll need to rename that one, or delete it, or apply a different name for your new chart sheet. Regards, Peter T "Dave Booker" wrote in message ... I am unable to set the Location of a ChartObject using Excel 2003, VB 6.3. The following code will return either Error 1004 or Run-time error '438': Object doesn't support this property or method. ActiveChart.Location Whe=xlLocationAsNewSheet, Name:="Test" However ActiveChart seems to be valid because immediately before (or after if the .Location line is commented out) other properties can be changed, e.g.: ActiveChart.Axes(xlValue, xlSecondary).MaximumScale = 0.6 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Then I'm out of ideas. Your original code is fine, subject an active chart
exists and no similarly named chart-sheet exists. Regards, Peter T "Dave Booker" wrote in message ... Tried that -- single-line macro that just calls the .Location method with Whe=xlLocationAsNewSheet, Name:="UniqueName" That still fails with error 438. "Peter T" wrote: Manually select your chart, just to be sure, and in your code change Name:="Test" to Name:="UniqueName" Regards, Peter T "Dave Booker" wrote in message ... Nope... no objects named "Test" in the workbook. "Peter T" wrote: As a guess, you already have a chart sheet named "Test". If so you'll need to rename that one, or delete it, or apply a different name for your new chart sheet. Regards, Peter T "Dave Booker" wrote in message ... I am unable to set the Location of a ChartObject using Excel 2003, VB 6.3. The following code will return either Error 1004 or Run-time error '438': Object doesn't support this property or method. ActiveChart.Location Whe=xlLocationAsNewSheet, Name:="Test" However ActiveChart seems to be valid because immediately before (or after if the .Location line is commented out) other properties can be changed, e.g.: ActiveChart.Axes(xlValue, xlSecondary).MaximumScale = 0.6 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
chart a location | Excel Discussion (Misc queries) | |||
workbook link failures | Links and Linking in Excel | |||
Excel 2002 : Need patching for formula failures | Excel Discussion (Misc queries) | |||
How to specify location for chart in VBA | Excel Discussion (Misc queries) | |||
Excel2000 VBA If-Then/Loop Failures | Excel Programming |