the code is to create chart and but name, title, range, style and type for chart
the code run well except type and style
any idea
Charts.Add
With ActiveChart
.HasTitle = True
.ChartTitle.Text = Application.InputBox("Please enter chart Title", "Chart Title", "As of " & Format(WorksheetFunction.EoMonth(Now(), -1), "dd mmm yyyy"), , , , , 2)
.SetSourceData Source:=Sheets("Sheet1").Range(Application.InputBox("Please select Range you want like....A1:B5 ", "Select Range", "As of A1:B5"), , , , , 2)
.Name = Application.InputBox("Please enter chart name", "Chart Name", "As of " & Format(WorksheetFunction.EoMonth(Now(), -1), "dd mmm yyyy"), , , , , 2)
.ChartStyle = Application.InputBox("Please enter chart style you want", "Chart style", "As of 2" & Format(WorksheetFunction.EoMonth(Now(), -1), "dd mmm yyyy"), , , , , 2)
.ChartType = xlColumnClustered
End With
Set AddGraph = ActiveChart
the code run well except type and style
any idea
Charts.Add
With ActiveChart
.HasTitle = True
.ChartTitle.Text = Application.InputBox("Please enter chart Title", "Chart Title", "As of " & Format(WorksheetFunction.EoMonth(Now(), -1), "dd mmm yyyy"), , , , , 2)
.SetSourceData Source:=Sheets("Sheet1").Range(Application.InputBox("Please select Range you want like....A1:B5 ", "Select Range", "As of A1:B5"), , , , , 2)
.Name = Application.InputBox("Please enter chart name", "Chart Name", "As of " & Format(WorksheetFunction.EoMonth(Now(), -1), "dd mmm yyyy"), , , , , 2)
.ChartStyle = Application.InputBox("Please enter chart style you want", "Chart style", "As of 2" & Format(WorksheetFunction.EoMonth(Now(), -1), "dd mmm yyyy"), , , , , 2)
.ChartType = xlColumnClustered
End With
Set AddGraph = ActiveChart