AW: Projekt oder Bibliothek nicht gefunden
28.01.2011 18:12:37
Paul
Hallo Sepp,
stimmt, ist sicher sinvoll.
Hier der Code. Ist nicht von mir, da ich nur mit Rcorder arbeiten kann. Wie gesagt, der Code hat unter XP funktioniert und tut noch immer.
Paul
Option Private Module
'Zeigt Spaltenbreite und Zeilehhöhe in cm an
'Die gewünschte Spaltenbreite und Zeilenhöhe kann über
'Inputbox eingegeben werden. Alle markierten Spalten werden geändert.
'L. Meister 6.1.02
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
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("j8").Select
Range("j9").Select
Exit Sub
Fehler:
Range("j9").Select
End Sub