Re: Spaltenbreite
01.10.2002 10:14:52
andreas e
hallo, mit nachstehendem code funzt es :von Frank Arendt-Theilen:
Sub SpaltenbreiteInCm()
Dim sBreite As Single
Dim sAktuell As Single
Dim strText As String
Dim strAntwort As String
sAktuell = (Selection.ColumnWidth + 0.71) / 5.1425
strText = "Aktuelle Spaltenbreite: " & _
Format(sAktuell, "###0.00 cm") & Chr(13) _
& "Geben Sie die gewünschte Spaltenbreite für die " & _
"aktuelle Spalte oder Markierung in cm ein:"
strAntwort = InputBox(strText, "Neue Spaltenbreite festlegen", _
Format(sAktuell, "###0.00"))
If strAntwort <> "" Then
sBreite = CSng(strAntwort)
Selection.ColumnWidth = -0.71 + 5.1425 * sBreite
End If
End Sub
gruß
andreas e
http:www.skripteundaufgaben.de viele kostenlose downloads zu excel und mehr