ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Please help with this chart (https://www.excelbanter.com/excel-programming/352969-please-help-chart.html)

alvin Kuiper

Please help with this chart
 
Hi
HAve seen a answer from Bob Phillips and try this
Sheets("Ark1").Select
cLastRow = Cells(Rows.Count, "B").End(xlUp).Row

Range("A1:B" & cLastRwo).Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Ark1").Range("A1:B" &
cLastRwo), PlotBy:= _
xlRows
ActiveChart.Location Whe=xlLocationAsNewSheet
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
But get an error in
Range("A1:B" & cLastRwo).Select

CAn someone help here ?

Alvin



alvin Kuiper

Please help with this chart
 
Sorry
Stupid error
have find it

Alvin


"alvin Kuiper" wrote:

Hi
HAve seen a answer from Bob Phillips and try this
Sheets("Ark1").Select
cLastRow = Cells(Rows.Count, "B").End(xlUp).Row

Range("A1:B" & cLastRwo).Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Ark1").Range("A1:B" &
cLastRwo), PlotBy:= _
xlRows
ActiveChart.Location Whe=xlLocationAsNewSheet
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
But get an error in
Range("A1:B" & cLastRwo).Select

CAn someone help here ?

Alvin




All times are GMT +1. The time now is 02:41 AM.

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