Sub InternaltionaleEinstellungenAusgeben()
->Erstellt ein neues Blatt und gibt darauf die aktuellen
->landesspez. und internationalen Einstellungen
Const c_SPInd As Long = 1
Const c_SPTyp As Long = 2
Const c_SPWert As Long = 3
Const c_SPBez As Long = 4
Dim ws As Worksheet, z As Long, x As Long, r As Range
Dim l As Long, s As String, b As Boolean
->neues Blatt anlegen
Set ws = ActiveWorkbook.Worksheets.Add
->Überschriften setzen, und Format
z = 1
With ws.Cells(z, c_SPInd): .Value = Index: .Font.Bold = True: End With
With ws.Columns(c_SPInd)
.HorizontalAlignment = xlLeft: .VerticalAlignment = xlTop: .NumberFormat = @
End With
With ws.Cells(z, c_SPTyp): .Value = Typ: .Font.Bold = True: End With
With ws.Columns(c_SPTyp)
.HorizontalAlignment = xlCenter: .VerticalAlignment = xlTop: .NumberFormat = @
End With
With ws.Cells(z, c_SPWert): .Value = Wert: .Font.Bold = True: End With
With ws.Columns(c_SPWert)
.HorizontalAlignment = xlCenter: .VerticalAlignment = xlTop: .NumberFormat = @
End With
With ws.Cells(z, c_SPBez): .Value = Bezeichnung: .Font.Bold = True: End With
With ws.Columns(c_SPBez)
.HorizontalAlignment = xlLeft: .VerticalAlignment = xlTop: .NumberFormat = @
.ColumnWidth = 70: .WrapText = True
End With
z = z + 1
->****** landerspezifische Einstellungen ausgeben
->Ländercode
ws.Cells(z, c_SPInd).Value = xlCountryCode & = xlCountryCode
ws.Cells(z, c_SPTyp).Value = Long
ws.Cells(z, c_SPWert).Value = l
ws.Cells(z, c_SPBez).Value = _
Die landesspezifische Version von Microsoft Excel
z = z + 1
l = Application.International(xlCountrySetting)
ws.Cells(z, c_SPInd).Value = xlCountrySetting & = xlCountrySetting
ws.Cells(z, c_SPTyp).Value = Long
ws.Cells(z, c_SPWert).Value = l
ws.Cells(z, c_SPBez).Value = _
Die aktuelle Ländereinstellung in der Systemsteuerung von Microsoft Windows
z = z + 1
s = Application.International(xlDecimalSeparator)
ws.Cells(z, c_SPInd).Value = xlDecimalSeparator & = xlDecimalSeparator
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Dezimaltrennzeichen
z = z + 1
s = Application.International(xlListSeparator)
ws.Cells(z, c_SPInd).Value = xlListSeparator & = xlListSeparator
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Listentrennzeichen
z = z + 1
s = Application.International(xlUpperCaseRowLetter)
ws.Cells(z, c_SPInd).Value = xlUpperCaseRowLetter & = xlUpperCaseRowLetter
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Ein Großbuchstabe für Zeilenangaben (in Z1S1-Bezügen)
z = z + 1
s = Application.International(xlUpperCaseColumnLetter)
ws.Cells(z, c_SPInd).Value = xlUpperCaseColumnLetter & = xlUpperCaseColumnLetter
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Ein Großbuchstabe für Spaltenangaben (in Z1S1-Bezügen)
z = z + 1
s = Application.International(xlLowerCaseRowLetter)
ws.Cells(z, c_SPInd).Value = xlLowerCaseRowLetter & = xlLowerCaseRowLetter
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Ein Kleinbuchstabe für Zeilenangaben
z = z + 1
s = Application.International(xlLowerCaseColumnLetter)
ws.Cells(z, c_SPInd).Value = xlLowerCaseColumnLetter & = xlLowerCaseColumnLetter
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Ein Kleinbuchstabe für Spaltenangaben
z = z + 1
s = Application.International(xlLeftBracket)
ws.Cells(z, c_SPInd).Value = xlLeftBracket & = xlLeftBracket
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Zeichen, das in Z1S1-Bezügen anstelle der linken eckigen Klammer ([) verwendet wird
z = z + 1
s = Application.International(xlRightBracket)
ws.Cells(z, c_SPInd).Value = xlRightBracket & = xlRightBracket
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Zeichen, das in Z1S1-Bezügen anstelle der rechten eckigen Klammer (]) verwendet wird
z = z + 1
s = Application.International(xlLeftBrace)
ws.Cells(z, c_SPInd).Value = xlLeftBrace & = xlLeftBrace
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Zeichen, das in einer Matrix anstelle der linken geschweiften Klammer ({) verwendet wird
z = z + 1
s = Application.International(xlRightBrace)
ws.Cells(z, c_SPInd).Value = xlRightBrace & = xlRightBrace
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Zeichen, das in einer Matrix anstelle der rechten geschweiften Klammer (}) verwendet wird
z = z + 1
s = Application.International(xlColumnSeparator)
ws.Cells(z, c_SPInd).Value = xlColumnSeparator & = xlColumnSeparator
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Zeichen, mit dem Spalten in einer Matrix getrennt werden
z = z + 1
s = Application.International(xlRowSeparator)
ws.Cells(z, c_SPInd).Value = xlRowSeparator & = xlRowSeparator
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Zeichen, mit dem Zeilen in einer Matrix getrennt werden
z = z + 1
s = Application.International(xlAlternateArraySeparator)
ws.Cells(z, c_SPInd).Value = xlAlternateArraySeparator & = xlAlternateArraySeparator
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das alternative Trennzeichen für Matrix-Elemente. & _
Dieses Zeichen wird verwendet, wenn das aktuelle Matrix-Trennzeichen & _
mit dem Dezimaltrennzeichen identisch ist.
z = z + 1
s = Application.International(xlDateSeparator)
ws.Cells(z, c_SPInd).Value = xlDateSeparator & = xlDateSeparator
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Datumstrennzeichen (. in Deutschland)
z = z + 1
s = Application.International(xlTimeSeparator)
ws.Cells(z, c_SPInd).Value = xlTimeSeparator & = xlTimeSeparator
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Uhrzeittrennzeichen (: in Deutschland)
z = z + 1
s = Application.International(xlYearCode)
ws.Cells(z, c_SPInd).Value = xlYearCode & = xlYearCode
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Jahressymbol in Zahlenformaten (j in Deutschland)
z = z + 1
s = Application.International(xlMonthCode)
ws.Cells(z, c_SPInd).Value = xlMonthCode & = xlMonthCode
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Monatssymbol (m in Deutschland)
z = z + 1
s = Application.International(xlDayCode)
ws.Cells(z, c_SPInd).Value = xlDayCode & = xlDayCode
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Tagessymbol (t in Deutschland)
z = z + 1
s = Application.International(xlHourCode)
ws.Cells(z, c_SPInd).Value = xlHourCode & = xlHourCode
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Stundensymbol (h in Deutschland)
z = z + 1
s = Application.International(xlMinuteCode)
ws.Cells(z, c_SPInd).Value = xlMinuteCode & = xlMinuteCode
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Minutensymbol (m in Deutschland)
z = z + 1
s = Application.International(xlSecondCode)
ws.Cells(z, c_SPInd).Value = xlSecondCode & = xlSecondCode
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Sekundensymbol (s in Deutschland)
z = z + 1
s = Application.International(xlCurrencyCode)
ws.Cells(z, c_SPInd).Value = xlCurrencyCode & = xlCurrencyCode
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Das Währungssymbol (EURO in Deutschland)
z = z + 1
s = Application.International(xlGeneralFormatName)
ws.Cells(z, c_SPInd).Value = xlGeneralFormatName & = xlGeneralFormatName
ws.Cells(z, c_SPTyp).Value = String
ws.Cells(z, c_SPWert).Value = s
ws.Cells(z, c_SPBez).Value = _
Der Name des Standard-Zahlenformats
z = z + 1
l = Application.International(xlCurrencyDigits)
ws.Cells(z, c_SPInd).Value = xlCurrencyDigits & = xlCurrencyDigits
ws.Cells(z, c_SPTyp).Value = Long
ws.Cells(z, c_SPWert).Value = l
ws.Cells(z, c_SPBez).Value = _
Die Anzahl der Nachkommastellen für Währungsformate
z = z + 1
l = Application.International(xlCurrencyNegative)
ws.Cells(z, c_SPInd).Value = xlCurrencyNegative & = xlCurrencyNegative
ws.Cells(z, c_SPTyp).Value = Long
ws.Cells(z, c_SPWert).Value = l
ws.Cells(z, c_SPBez).Value = _
Währungsformat für negative Beträge
z = z + 1
l = Application.International(xlNoncurrencyDigits)
ws.Cells(z, c_SPInd).Value = xlNoncurrencyDigits & = xlNoncurrencyDigits
ws.Cells(z, c_SPTyp).Value = Long
ws.Cells(z, c_SPWert).Value = l
ws.Cells(z, c_SPBez).Value = _
Die Anzahl der Nachkommastellen für Nicht-Währungsformate
z = z + 1
l = Application.International(xlMonthNameChars)
ws.Cells(z, c_SPInd).Value = xlMonthNameChars & = xlMonthNameChars
ws.Cells(z, c_SPTyp).Value = Long
ws.Cells(z, c_SPWert).Value = l
ws.Cells(z, c_SPBez).Value = _
Gibt immer drei zurück für Abwärtskompatibilität. & _
In Microsoft Excel 97 werden kurze Monatsnamen aus Microsoft Windows gelesen & _
und können eine beliebige Länge haben
z = z + 1
l = Application.International(xlWeekdayNameChars)
ws.Cells(z, c_SPInd).Value = xlWeekdayNameChars & = xlWeekdayNameChars
ws.Cells(z, c_SPTyp).Value = Long
ws.Cells(z, c_SPWert).Value = l
ws.Cells(z, c_SPBez).Value = _
Gibt immer drei zurück für Abwärtskompatibilität. & _
In Microsoft Excel 97 werden kurze Wochentagnamen aus Microsoft Windows & _
gelesen und können eine beliebige Länge haben
z = z + 1
l = Application.International(xlDateOrder)
ws.Cells(z, c_SPInd).Value = xlDateOrder & = xlDateOrder
ws.Cells(z, c_SPTyp).Value = Long
ws.Cells(z, c_SPWert).Value = l
ws.Cells(z, c_SPBez).Value = _
Die Reihenfolge der Datumselemente: & vbLf & _
0 = Monat-Tag-Jahr & vbLf & _
1 = Tag-Monat-Jahr & vbLf & _
2 = Jahr-Monat-Tag
z = z + 1
b = Application.International(xl24HourClock)
ws.Cells(z, c_SPInd).Value = xl24HourClock & = xl24HourClock
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True beim 24-Stunden-Zeitformat, & vbLf & _
False beim 12-Stunden-Zeitformat
z = z + 1
b = Application.International(xlNonEnglishFunctions)
ws.Cells(z, c_SPInd).Value = xlNonEnglishFunctions & = xlNonEnglishFunctions
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn Funktionen nicht in Englisch angezeigt werden.
z = z + 1
b = Application.International(xlMetric)
ws.Cells(z, c_SPInd).Value = xlMetric & = xlMetric
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn das metrische System verwendet wird. & vbLf & _
False, wenn das englische Maßsystem verwendet wird.
z = z + 1
b = Application.International(xlCurrencySpaceBefore)
ws.Cells(z, c_SPInd).Value = xlCurrencySpaceBefore & = xlCurrencySpaceBefore
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn vor dem Währungssymbol ein Leerzeichen eingefügt wird.
z = z + 1
b = Application.International(xlCurrencyMinusSign)
ws.Cells(z, c_SPInd).Value = xlCurrencyMinusSign & = xlCurrencyMinusSign
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn vor negativen Zahlen ein Minuszeichen angegeben wird. & vbLf & _
False, wenn Klammern verwendet werden.
z = z + 1
b = Application.International(xlCurrencyTrailingZeros)
ws.Cells(z, c_SPInd).Value = xlCurrencyTrailingZeros & = xlCurrencyTrailingZeros
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn nachstehende Nullen bei Nullbeträgen angezeigt werden.
z = z + 1
b = Application.International(xlCurrencyLeadingZeros)
ws.Cells(z, c_SPInd).Value = xlCurrencyLeadingZeros & = xlCurrencyLeadingZeros
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn führende Nullen bei Nullbeträgen angezeigt werden.
z = z + 1
b = Application.International(xlMonthLeadingZero)
ws.Cells(z, c_SPInd).Value = xlMonthLeadingZero & = xlMonthLeadingZero
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn bei als Zahlen dargestellten Monaten führende Nullen angezeigt werden.
z = z + 1
b = Application.International(xlDayLeadingZero)
ws.Cells(z, c_SPInd).Value = xlDayLeadingZero & = xlDayLeadingZero
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn bei Tagen eine führende Null angezeigt wird.
z = z + 1
b = Application.International(xl4DigitYears)
ws.Cells(z, c_SPInd).Value = xl4DigitYears & = xl4DigitYears
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn Jahreszahlen mit 4 Ziffern angezeigt werden. & vbLf & _
False, wenn nur 2 Ziffern verwendet werden.
z = z + 1
b = Application.International(xlMDY)
ws.Cells(z, c_SPInd).Value = xlMDY & = xlMDY
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn im langen Datumsformat die Datumsreihenfolge Monat-Tag-Jahr lautet. & vbLf & _
False, wenn die Reihenfolge Tag-Monat-Jahr ist.
z = z + 1
b = Application.International(xlTimeLeadingZero)
ws.Cells(z, c_SPInd).Value = xlTimeLeadingZero & = xlTimeLeadingZero
ws.Cells(z, c_SPTyp).Value = Boolean
ws.Cells(z, c_SPWert).Value = b
ws.Cells(z, c_SPBez).Value = _
True, wenn bei Uhrzeiten führende Nullen angezeigt werden.
->grid setzen
Set r = ws.Range(Cells(1, 1), Cells(z, c_SPBez))
r.Borders(xlDiagonalDown).LineStyle = xlNone
r.Borders(xlDiagonalUp).LineStyle = xlNone
With r.Borders(xlEdgeLeft)
.LineStyle = xlContinuous: .Weight = xlMedium: .ColorIndex = xlAutomatic
End With
With r.Borders(xlEdgeTop)
.LineStyle = xlContinuous: .Weight = xlMedium: .ColorIndex = xlAutomatic
End With
With r.Borders(xlEdgeBottom)
.LineStyle = xlContinuous: .Weight = xlMedium: .ColorIndex = xlAutomatic
End With
With r.Borders(xlEdgeRight)
.LineStyle = xlContinuous: .Weight = xlMedium: .ColorIndex = xlAutomatic
End With
With r.Borders(xlInsideVertical)
.LineStyle = xlContinuous: .Weight = xlThin: .ColorIndex = xlAutomatic
End With
With r.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous: .Weight = xlThin: .ColorIndex = xlAutomatic
End With
->Spaltenbreite anpassen
ws.Columns(c_SPInd).AutoFit
ws.Columns(c_SPTyp).AutoFit
ws.Columns(c_SPWert).AutoFit
ws.PageSetup.CenterHeader = _
International -Eigenschaft & vbLf & _
Informationen der aktuellen landesspez. und internationalen Einstellungen & vbLf & _
Application.International(Index)
ws.PageSetup.Zoom = False
ws.PageSetup.FitToPagesTall = 1
ws.PageSetup.FitToPagesWide = 1
Set ws = Nothing: Set r = Nothing
End Sub