DANKE!!!
Sub Spaltenbreite()
Dim breite As Single, aktuell As Single, text As String, antwort As String
On Error Resume Next
aktuell = (Selection.ColumnWidth + 0.71) / 5.1425
text = "Aktuelle Spaltenbreite: " & Format(aktuell, "###0.00 cm") & Chr(13) & "Geben Sie _
die gewünschte Spaltenbreite für die aktuelle Spalte oder Markierung in cm ein:"
antwort = InputBox(text, "Neue Spaltenbreite festlegen", Format(aktuell, "###0.00"))
If antwort "" Then
breite = CSng(antwort)
Selection.ColumnWidth = -0.71 + 5.1425 * breite
End If
End Sub
Sub Zeilenhoehe()
Dim hoehe As Single, aktuell As Single, text As String, antwort As String
On Error Resume Next
aktuell = Selection.RowHeight / 29.5
text = "Aktuelle Zeilenhöhe: " & Format(aktuell, "###0.00 cm") & Chr(13) & "Geben Sie die gewü _
nschte Zeilenhöhe für die aktuelle Zeile oder Markierung in cm ein:"
antwort = InputBox(text, "Neue Zeilenhöhe festlegen", Format(aktuell, "###0.00"))
If antwort "" Then
hoehe = CSng(antwort)
Selection.RowHeight = hoehe * 29.5
End If
End Sub
Gruß
Wolfgang
Call Spaltenbereite
, in den zweiten Button
Call Zeilenhoehe
Du kannst auch über das Menü Ansicht-Symbolleisten-Anpassen eine Benutzerdefinierte Schaltfläche unter Makros irgendwo in eine bestehende Symbolleiste einfügen und dieser Schaltfläche dann ein Makro zuweisen.
Grüße
Hoffi