Example The cmdUndo Click Event Procedure

Private Sub cmdUndo Click()

' Restore labels for DataSeries

Dim i As Integer

For i = 1 To cPoints

If LabelsForUndo(i).HasDataLabel Then

DataSeries.Points(i).HasDataLabel = True

DataSeries.Points(i).DataLabel.Text = LabelsForUndo(i).Label

If bCopyFormatting Then ' Restore formatting

With DataSeries.Points(i).DataLabel.Font .Name = LabelsForUndo(i).FontName .Size = LabelsForUndo(i).FontSize .Color = LabelsForUndo(i).Color .Bold = LabelsForUndo(i).Bold .Italic = LabelsForUndo(i).Italic End With End If Else

DataSeries.Points(i).HasDataLabel = False End If Next cmdUndo.Enabled = False End Sub

0 0

Post a comment