AW: Aus Werteberechnungen Zeilehöhe bestimmen
21.11.2011 10:30:27
Paulq
Hallo,
ich habe was gefunden um eine Einzelne Zeile anzupassen. Wie kann ich das Erweitern, damit alle Zeilen individuell nach Wert verändert werden?
Sub Format_Spalten_ZeilenCM()
Dim sBreite As Single
Dim sAktuell As Single
Dim strText As String
Dim strAntwort As String
Dim ZHöhe As Single
Dim ZAktuell As Single
Dim spalte As Single
Dim faktor As Single
'On Error GoTo Fehler
spalte = Selection.ColumnWidth
sAktuell = (Selection.ColumnWidth + 0.71) / 5.1425 * 10
'strText = "Faktor Modulbreite: " & _
'Format(sAktuell, "###0.00") & Chr(13) _
'& "Gib den Wert aus der Zelle BREITE ein" & _
'strAntwort = ActiveSheet.Range("B6").Value
'strAntwort = InputBox(strText, "Neue Spaltenbreite festlegen", _
Format(sAktuell, "###0.00"))
'If strAntwort "" Then
'sBreite = Val(strAntwort)
'sBreite = CSng(strAntwort)
sBreite = [B6]
Selection.ColumnWidth = -0.71 + 5.1425 * sBreite / 10
'End If
ZAktuell = Selection.RowHeight
faktor = 2.9999
ZAktuell = ZAktuell / faktor '(Selection.RowHeight)
'strText = "Faktor Modulhöhe: " & _
Format(ZAktuell, "###0.00") & Chr(13) _
'& "Gib den Wert aus der Zelle HÖHE ein" & _
'strAntwort = ActiveSheet.Range("b8).Value
'strAntwort = InputBox(strText, "Neue Zeilenhöhe festlegen", _
Format(ZAktuell, "###0.00"))
'If strAntwort "" Then
'ZHöhe = CSng(strAntwort)
ZHöhe = [B8]
Selection.RowHeight = faktor * ZHöhe
'End If
'Range("F:J").Select
Range("L9").Select
Exit Sub
End Sub