Hi All,
I'd like to add a message box to the following macro.
Basically, I'd like to have a message box come up that asks the user to define which series the formatting should be applied to. So, the line in the macro where it says For i = x to y would be defined by the message box.
I'd also like to have a message box that would allow a user to select what color they wanted to use for the formatting, with the names matched to a list of RGB values. The part in the macro where it lists the RGB value to use would come from that input.
Any help would be appreciated, I've never used a message box or input box before. Thank you!
I'd like to add a message box to the following macro.
Code:
Sub FormatDataPoints()
Dim i As Long
With ActiveSheet.ChartObjects("Chart 1").Chart
For i = 1 To 10
With .SeriesCollection(i)
.MarkerStyle = 2
.MarkerSize = 7
.Format.Fill.ForeColor.RGB = RGB(0, 128, 0)
.Format.Line.Visible = msoFalse
.ApplyDataLabels
With .DataLabels
.ShowSeriesName = True
.ShowValue = False
.Position = Above
.Format.TextFrame2.TextRange.Font.Fill.ForeColor.RGB = RGB(0, 128, 0)
End With
End With
Next i
End With
End Sub
Basically, I'd like to have a message box come up that asks the user to define which series the formatting should be applied to. So, the line in the macro where it says For i = x to y would be defined by the message box.
I'd also like to have a message box that would allow a user to select what color they wanted to use for the formatting, with the names matched to a list of RGB values. The part in the macro where it lists the RGB value to use would come from that input.
Any help would be appreciated, I've never used a message box or input box before. Thank you!