AW: Zeilenhöhe und Spaltenbreite auf cm umstellen
01.03.2004 19:48:26
Klaus
Hallo Sylvia,
vielleicht kann ich dir helfen.
Mit folgenden Makros müßte es möglich sein
Sub Zeilenhöhe()
Dim hoehe As Single
Dim aktuell As Single
Dim Text As String
Dim antwort As String
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
Sub Spaltenbreite()
Dim Width As Single
Dim aktuell As Single
Dim Text As String
Dim antwort As String
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
Width = CSng(antwort)
Selection.ColumnWidth = -0.71 + 5.1425 * Width
End If
End Sub
Tschüß Klaus