Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() When I record a chart macro and then run it, it gives an error message on th eline Charts.Add, when the workbook is locked. How can i get around this without manually unprotecting the workbook. Also when run it produces a new sheet called Chart1. I do not want to create a new sheet with the chart, but rather have it appear on the screen where the data tables are. Finally is there a way for me to create a user form, which has 3 different options for different charts, taken from different data, and when each is selected the corresponding chart is diplayed on the user form, or in the window. This is the code for one chart so far, this generates the error mentioned above: Sub Chart2() ' Range("A5:C12").Select Charts.Add ActiveChart.ChartType = xl3DBarClustered ActiveChart.SetSourceData Source:=Sheets("BRANCH TOTAL CURRENT v PREVIOUS"). _ Range("A5:C12"), PlotBy:=xlColumns ActiveChart.Location Whe=xlLocationAsNewSheet With ActiveChart ..HasTitle = True ..ChartTitle.Characters.Text = _ "Total Branch Scores-Current vs Previous (In-Branch)" ..Axes(xlCategory).HasTitle = True ..Axes(xlCategory).AxisTitle.Characters.Text = "Branch" ..Axes(xlSeries).HasTitle = False ..Axes(xlValue).HasTitle = True ..Axes(xlValue).AxisTitle.Characters.Text = "Indexed Scores" End With End Sub Any help would be appreciated -- kwedde01 ------------------------------------------------------------------------ kwedde01's Profile: http://www.excelforum.com/member.php...o&userid=24156 View this thread: http://www.excelforum.com/showthread...hreadid=378714 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to change position of chart labels on line chart | Charts and Charting in Excel | |||
Chart macro | Charts and Charting in Excel | |||
chart macro | Excel Discussion (Misc queries) | |||
Chart Macro | Charts and Charting in Excel | |||
Chart Macro | Charts and Charting in Excel |