Private
Sub
CommandButton1_Click()
Dim
SchriftNr, x
As
Integer
, Schriftliste
As
Object
Set
Schriftliste = Application.CommandBars(
"formatting"
).FindControl(ID:=1728)
On
Error
Resume
Next
Application.ScreenUpdating =
False
[A:B].ClearContents
Rows(
"1:5"
).
Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range(
"A1"
).
Select
x = 1
For
SchriftNr = 0
To
Schriftliste.ListCount - 1
Cells(SchriftNr + 1, 1).Value = Schriftliste.List(SchriftNr + 1)
Cells(SchriftNr + 1, 2).Value = UserForm1.TextBox2
Cells(SchriftNr + 1, 2).Font.Name = Schriftliste.List(SchriftNr + 1)
Cells(SchriftNr + 1, 2).Font.Size = Val(UserForm1.TextBox1)
If
x = 1
Then
UserForm1.Label5 =
"|"
If
x = 2
Then
UserForm1.Label5 =
"/"
If
x = 3
Then
UserForm1.Label5 =
"--"
If
x = 4
Then
UserForm1.Label5 = "\"
x = 0
End
If
x = x + 1
UserForm1.Label6 = SchriftNr
Next
Application.ScreenUpdating =
True