Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code, almost got what I want, but each time I run
it, it says: run time error 13, type mismatch. do you know what went wrong? thanksssssss........ Sub AddChart() Dim chtChart As Chart Dim Myrange As Range ActiveSheet.ChartObjects.Delete 'Create a new chart. Set chtChart = Charts.Add Set chtChart = chtChart.Location(Whe=xlLocationAsObject, Name:="Sheet2") Set Myrange = Selection With chtChart .ChartType = xlColumnClustered 'Set data source range. .SetSourceData Source:=Sheets("Sheet2").Myrange, PlotBy:= _ xlRows .HasTitle = True .ChartTitle.Text = "=Sheet2!R1C1" 'The Parent property is used to set properties of 'the Chart. With .Parent .Top = Range("F9").Top .Left = Range("F9").Left .Name = "ToolsChart2" End With End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can i edit only a selected range of data in an excel chart? | Charts and Charting in Excel | |||
dynamic chart on user selected data range in Excel 2007 | Charts and Charting in Excel | |||
How can i make a chart to show range and median ? | Charts and Charting in Excel | |||
how do i make it so that when a sheat is selected either via link or tab, that xlLastCell is selected. the last on the sheet. | Excel Worksheet Functions | |||
plotting chart with user selected range from current workbook | Excel Programming |