With ActiveSheet.Shapes("Rechteck1")
.Width = Application.CentimetersToPoints(9)
.Height = Application.CentimetersToPoints(6)
End With
Sub Spaltenbreite_in_cm()
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
Sub Zeilenhoehe_In_cm()
Dim sHoehe As Single
Dim sAktuell As Single
Dim strText As String
Dim strAntwort As String
sAktuell = Selection.RowHeight / 29.5
strText = "Aktuelle Zeilenhöhe: " & Format(sAktuell, "###0.00 cm") _
& Chr(13) & "Geben Sie die gewünschte Zeilenhöhe für die " & _
"aktuelle Zeile oder Markierung in cm ein:"
strAntwort = InputBox(strText, "Neue Zeilenhöhe festlegen", _
Format(sAktuell, "###0.00"))
If strAntwort <> "" Then
sHoehe = CSng(strAntwort)
Selection.RowHeight = sHoehe * 29.5
End If
End Sub
With ActiveSheet.Shapes("Rechteck1")
.Width = -0.71 + 5.1425 * 9
.Height = 6 * 29.5
End With
Public Function SBreite_ZHöhe_2Punkt(ByRef ZeileSpalte As String, ByRef Wert_in_mm As Single) As Single
Dim Berechnung As Single
Select Case ZeileSpalte
Case "Zeile"
Berechnung = Application.CentimetersToPoints(Wert_in_mm / 10) + _
0.0375 * Application.CentimetersToPoints(Wert_in_mm / 10) + 0.0545
Case "Spalte"
Berechnung = Application.CentimetersToPoints(Wert_in_mm / 10) - _
0.045 * Application.CentimetersToPoints(Wert_in_mm / 10) + 0.1012
End Select
SBreite_ZHöhe_2Punkt = Berechnung
End Function
Excel Makro erscheint nicht in Makroliste
H.E.N.K 01.02.2007 - 218 Hits - 1 Antwort
Makro zur Bildgrößenveränderung
AWW 18.07.2007 - 5 Hits - 10 Antworten
Datei über VBA-Makro öffnen
andreas_3 09.09.2007 - 161 Hits - 2 Antworten
Brauche Tipps für einen individuellen VBA-Code
varginator 03.04.2008 - 118 Hits - 14 Antworten