Option
Explicit
Public
Sub
OnDropDownChange()
If
0 <> StrComp(TypeName(Application.Caller),
"String"
, vbTextCompare)
Then
Exit
Sub
End
If
Dim
shp
As
Excel.Shape
Set
shp = ActiveSheet.Shapes(Application.Caller)
If
shp.Type <> MsoShapeType.msoFormControl
Then
Exit
Sub
If
shp.FormControlType <> XlFormControl.xlDropDown
Then
Exit
Sub
Dim
rngList
As
Excel.Range
Set
rngList = shp.TopLeftCell.Worksheet.Range(shp.ControlFormat.ListFillRange)
If
shp.ControlFormat.ListIndex > 0
Then
Select
Case
rngList.Cells(shp.ControlFormat.ListIndex)
Case
"variable Leasingrate"
Call
var_Leas_1
Case
"konstante Leasingrate"
Call
konst_Leas_1
End
Select
End
If
End
Sub
Sub
var_Leas_1()
MsgBox
"variabel"
End
Sub
Sub
konst_Leas_1()
MsgBox
"konstant"
End
Sub