Ich versuche gerade nach einer Routine eine Userform zu schließen, doch irgendwie bekomme ich das nicht hin. (sehe den Wald vor lauter Bäumen nicht mehr)
Mit unlaod funktioniert es nicht so richtig....
Hoffe Ihr könnt mir helfen! Danke auf jedenfall für eure Unterstützung.
Thomas
Private Sub Chart_Activate()
'Dimension variables.
Dim Counter As Integer, ChartName As String, xVals As String
Dim rngC As Range
' Open Information before subroutine starts
UF1.Show
' Disable screen updating while the subroutine is run.
Application.ScreenUpdating = False
'Store the formula for the first series in "xVals".
xVals = ActiveChart.SeriesCollection(1).Formula
'Extract the range for the data from xVals.
xVals = Mid(xVals, InStr(InStr(xVals, ","), xVals, Mid(Left(xVals, InStr(xVals, "!") - 1), _
9)))
xVals = Left(xVals, InStr(InStr(xVals, "!"), xVals, ",") - 1)
Do While Left(xVals, 1) = ","
xVals = Mid(xVals, 2)
Loop
'Attach a label to each data point in the chart.
For Each rngC In Range(xVals)
If Not rngC.Rows.Hidden Then
Counter = Counter + 1
ActiveChart.SeriesCollection(1).Points(Counter).HasDataLabel = True
ActiveChart.SeriesCollection(1).Points(Counter).DataLabel.Text = rngC.Offset(0, _
-34).Value
End If
Next rngC
' Enable screen updating while the subroutine is run.
Application.ScreenUpdating = True
' Close Information after subroutine
Unload UF1
End Sub