ExcelBanter

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

Tony Reflinski[_2_]

Active Sheet
 
In the following expression, how to change "Sheet1" so a
plot will be placed on active sheet?

ActiveChart.Location Whe=xlLocationAsObject, _
Name:="Sheet1"

Nigel

Active Sheet
 
As I understand it the Active object here is the chart, so there is no
active sheet. So you specify the location of the object by direct reference.
Try using the ChartObject.Add method. Then set the chart objects as
required.

Dim Ash As Worksheet
Set Ash = ActiveSheet 'current active sheet

Dim Ach As ChartObject

Set Ach = Ash.ChartObjects.Add(100, 30, 400, 250)

Cheers
Nigel


"Tony Reflinski" wrote in message
...
In the following expression, how to change "Sheet1" so a
plot will be placed on active sheet?

ActiveChart.Location Whe=xlLocationAsObject, _
Name:="Sheet1"





All times are GMT +1. The time now is 03:09 PM.

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