Sheets(appServer & "chart").Select ActiveChart.ChartTitle.Select ActiveChart.ChartTitle.Text = appServer ActiveChart.PlotArea.Select Selection.Width = 434.944 ActiveChart.Legend.Select ActiveChart.ChartArea.Select ActiveChart.Legend.Select Selection.Left = 466.86 Selection.Top = 62.544
Dim chartRangeStart As Integer Dim chartRangeEnd As Integer Dim serverNum As Integer Dim numOfServers As Integer Dim topOfCheckbox As Integer Dim appServerNum As Integer Dim appServer As String chartRangeStart = 51 chartRangeEnd = 98 numOfServers = 23 serverNum = 1 topOfCheckbox = 56 appServerNum = 0 appServer = server Do While serverNum <= numOfServers ' adds a checkbox for each appServer in an array ActiveChart.CheckBoxes.Add(4529766, 485607, 685185.75, 685896.75).Select Selection.Characters.Text = ServerNamesArray(appServerNum) Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Fill.ForeColor.SchemeColor = 9 Selection.ShapeRange.Fill.Transparency = 0# Selection.ShapeRange.Line.Weight = 0.75 Selection.ShapeRange.Line.DashStyle = msoLineSolid Selection.ShapeRange.Line.Style = msoLineSingle Selection.ShapeRange.Line.Transparency = 0# Selection.ShapeRange.Line.Visible = msoFalse With Selection .Value = xlOff .LinkedCell = appServer & "!$" & ColumnArray(appServerNum) & "$2" .Display3DShading = False End With ' moves the checkbox to where I want it (until I save and reopen) Selection.ShapeRange.IncrementLeft 465# Selection.ShapeRange.IncrementTop topOfCheckbox Selection.ShapeRange.ScaleWidth 2#, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleHeight 1#, msoFalse, msoScaleFromTopLeft topOfCheckbox = topOfCheckbox + 13 Loop
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)