Habe wieder einmal ein Problem mit dem Einrichten von Tabellen.
Die Breite von Spalten wird immer in Pixel angezeigt.
Wie kann man das in mm sehen?
Hat jemand eine Lösung?
Vielen Dank
Jürgen
Sub zeilenhoehe()
Dim hoehe As Single, aktuell As Single, text As String, antwort As String
'aktuelle Zeilenhöhe ermitteln
aktuell = Selection.RowHeight / 29.5
'Text zur Ausgabe vorbereiten
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:"
'InputBox anzeigen
antwort = InputBox(text, "Neue Zeilenhöhe festlegen", Format(aktuell, "###0.00"))
'antwort auswerten und neue Zeilenhöhe setzen
If antwort <> "" Then
hoehe = CSng(antwort)
Selection.RowHeight = hoehe * 29.5
End If
End Sub
Sub spaltenbreite()
Dim breite As Single, aktuell As Single, text As String, antwort As String
'aktuelle Splatenbreite ermitteln
aktuell = (Selection.ColumnWidth + 0.71) / 5.1425
'Text zur Ausgabe vorbereiten
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:"
'InputBox anzeigen
antwort = InputBox(text, "Neue Spaltenbreite festlegen", Format(aktuell, "###0.00"))
'antwort auswerten und neue Spaltenbreite setzen
If antwort <> "" Then
breite = CSng(antwort)
Selection.ColumnWidth = -0.71 + 5.1425 * breite
End If
End Sub