Gruppe
Dialog
Problem
Wie kann ich in Abhängigkeit von OptionsFeld- oder ListBox-Click Makros verzweigen und die Werte ausgeben?
ClassModule: Tabelle2
Private Sub ListBox1_Change()
Call Message
End Sub
Private Sub OptionButton1_Click()
Call Message
End Sub
Private Sub OptionButton2_Click()
Call Message
End Sub
Private Sub OptionButton3_Click()
Call Message
End Sub
Private Sub OptionButton4_Click()
Call Message
End Sub
Private Sub Message()
Dim oOle As OLEObject
Dim iCounter As Integer
For iCounter = 1 To 4
If ActiveSheet.OLEObjects(iCounter) _
.Object.Value = True Then
Exit For
End If
Next iCounter
MsgBox ActiveSheet.OLEObjects(iCounter) _
.Object.Caption & " - " & ListBox1.Value
End Sub