AW: Zeilenhöhe
22.09.2011 13:22:33
Marc
Hi,
habe da mal 2 Makros im Netz gefunden:
Sub spaltenbreite()
Dim breite As Single, aktuell As Single, text As String, antwort As String
aktuell = (Selection.ColumnWidth + 0.71) / 5.1425
text = "aktuelle Spaltenbreite: " & Format(aktuell, "###0.00 cm") & Chr(13) & "gewünschte _
Spaltenbreite in cm:"
antwort = InputBox(text, "Spaltenbreite in cm 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
aktuell = Selection.RowHeight * 0.035
text = "aktuelle Zeilenhöhe: " & Format(aktuell, "###0.00 cm") & Chr(13) & "gewünschte Zeilenhö _
he in cm:"
antwort = InputBox(text, "Zeilenhöhe in cm festlegen", Format(aktuell, "###0.00"))
If antwort "" Then
hoehe = CSng(antwort)
Selection.RowHeight = hoehe / 0.035
End If
End Sub
Mir hilft das sehr. Musst einfach in der Zelle stehen, die Du formatieren möchtest, oder alle markieren.
Gruß
Marc