Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Chart .Location failures

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Chart .Location failures

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Chart .Location failures

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Chart .Location failures

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Chart .Location failures

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Chart .Location failures

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
chart a location Jamie Excel Discussion (Misc queries) 0 January 29th 10 06:46 AM
workbook link failures curiouskiwi Links and Linking in Excel 3 October 23rd 08 09:32 AM
Excel 2002 : Need patching for formula failures Mr. Low Excel Discussion (Misc queries) 1 May 20th 08 06:30 PM
How to specify location for chart in VBA Fred Smith[_4_] Excel Discussion (Misc queries) 1 February 27th 08 01:50 PM
Excel2000 VBA If-Then/Loop Failures prodsched Excel Programming 5 March 3rd 04 08:31 PM


All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"