Sie sind auf Seite 1von 4

Dim sDay As String

sDay = Application.International(xlDayCode)
MsgBox Format(Now(), sDay & sDay & sDay & sDay)

'currency code:

Dim sCurrency As String


sCurrency = Application.International(xlCurrencyCode)

The following are just a few of the index values for International() queries

Index Type Meaning

xlCountryCode Long Country version of Microsoft Excel.

xlCountrySetting Long Current country setting in the Windows Control Panel, or the country
number as determined by your Macintosh system
software.

xlCurrencyCode String Returns the currency character

xlDecimalSeparator String Decimal separator.

xlThousandsSeparator String Zero or thousands separator.

xlListSeparator String List separator.

xlUpperCaseRowLetter String Uppercase row letter (for R1C1-style references).

xlUpperCaseColumnLetter String Uppercase column letter.

xlLowerCaseRowLetter String Lowercase row letter.

xlLowerCaseColumnLetter String Lowercase column letter.

xlLeftBracket String Character used instead of the left bracket ([) in R1C1-style relative
references.

xlRightBracket String Character used instead of the right bracket (]) in R1C1-style references.

xlLeftBrace String Character used instead of the left brace ({) in array literals.

xlRightBrace String Character used instead of the right brace (}) in array literals.

26
xlColumnSeparator String Character used to separate columns in array literals.

xlRowSeparator String Character used to separate rows in array literals.

xlAlternateArraySeparator String Alternate array item separator to use if the current array
separator is the same as the decimal separator.

xlDateSeparator String Date separator (/ in U.S. version).

xlTimeSeparator String Time separator (: in U.S. version).

xlYearCode String Year symbol in number formats (y in U.S. version).

xlMonthCode String Month symbol (m in U.S. version).

xlDayCode String Day symbol (d in U.S. version).

xlHourCode String Hour symbol (h in U.S. version).

xlMinuteCode String Minute symbol (m in U.S. version).

xlSecondCode String Second symbol (s in U.S. version).

xlCurrencyCode String Currency symbol ($ in U.S. version).

xlGeneralFormatName String Name of the General number format.

xlCurrencyDigits Long Number of decimal digits to use in currency formats.

xlCurrencyNegative Long Currency format for negative currency values:

0 = ($x) or (x$)

1 = -$x or -x$

2 = $-x or x-$

3 = $x- or x$-

27
Note that the position of the currency symbol is determined by xlCurrencyBefore.

xlNoncurrencyDigits Long Number of decimal digits to use in non-currency formats.

xlMonthNameChars Long Always returns three for backwards compatibility.

xlWeekdayNameChars Long Always returns three for backwards compatibility.

xlDateOrder Long Order of date elements:

0 = month-day-year

1 = day-month-year

2 = year-month-day

xl24HourClock Boolean True if using 24-hour time, False if using 12-hour time.

xlNonEnglishFunctions Boolean True if not displaying functions in English.

xlMetric Boolean True if using the metric system, False if using the English measurement
system.

xlCurrencySpaceBefore Boolean True if a space is added before the currency symbol.

xlCurrencyBefore Boolean True if the currency symbol precedes the currency values, False if it
follows them.

xlCurrencyMinusSign Boolean True if using a minus sign for negative numbers, False if using
parentheses.

xlCurrencyTrailingZeros Boolean True if trailing zeros are displayed for zero currency values.

xlCurrencyLeadingZeros Boolean True if leading zeros are displayed for zero currency values.

xlMonthLeadingZero Boolean True if a leading zero is displayed in months (when months are
displayed as numbers).

xlDayLeadingZero Boolean True if a leading zero is displayed in days.

28
xl4DigitYears Boolean True if using four-digit years, False if using two-digit years.

xlMDY Boolean True if the date order is month-day-year for dates displayed in the long form,
False if the date order is day-month-year.

xlTimeLeadingZero Boolean True if a leading zero is displayed in times.

3.10 Controlling The Cursor Appearance


The cursor can jiggle back and forth between an hourglass and an arrow as your macros run. It is
possible to control the appearance of the cursor via code. The following sets it to a nice sedate
hourglass:

Application.Cursor = xlWait

To set it back, which you must do before your code completes, use the following statement:

Application.Cursor = xlDefault

If you do not set it back (for example an error occurs that crashes your code), then the cursor will
stay an hourglass.

3.11 Displaying the Developer Tab


In Excel 2007, you can display the developer tab to access macro functions such as
recording a macro by

• Office Button > Excel Optoins > Popular

or

• Press ALT tms

3.12 Using The Immediate Window


The Immediate window in the VB editor is a very useful debug tool. You can use it if you have
paused your macro (either through an error and clicking Debug, using a break point or using a
Stop statement). The Immediate window can be displayed by choosing "Immediate Window"
from the View menu or by pressing CTL-G.

In the immediate window, you can get the a value by typing a question mark and a valid
statement:

?ActiveCell.Value

29

Das könnte Ihnen auch gefallen