Sub
CommandButton1_Click()
Dim
p
As
Variant
If
OptionButton1 =
True
Then
p = 1
If
OptionButton2 =
True
Then
p = 2
If
OptionButton3 =
True
Then
p = 3
If
<strong>ActiveWorkbook.CustomDocumentProperties(
"Werk"
</strong>)
Is
Nothing
Then
ActiveWorkbook.CustomDocumentProperties.Add _
Name:=
"Werk"
, LinkToContent:=
False
, Value:=p, _
Type:=msoPropertyTypeNumber
Else
ActiveWorkbook.CustomDocumentProperties(
"Werk"
) = p
End
If
Me
.Hide
EingabeKennzahlen.Show
End
Sub