Quick Reference

VBA FUNCTION QUICK REFERENCE (CONTINUED)

String Manipulation Functions (Continued)

FUNCTION

DESCRIPTION

RETURNS

ISpc(n)

Positions output when printing to a file.

String

Str(number)

Returns a string representation of a number.

String

StrComp(string1, string2[, compare])

Returns a value indicating the result of a string comparison.

Integer

StrConv(string, conversion, LCID)

Converts a string to the specified format.

String

String(number, character)

Creates a string by repeating a character the specified number of times.

String

Tab[(n)]

Positions output when printing to a file.

String

Trim(string)

Trims spaces from left and right of a string.

String

UCase(string)

Converts a string to uppercase.

String

VBA FUNCTION CONSTANTS AND CHARACTERS

vbMsgBoxStyle Constants (MsgBox Function)

CONSTANT

VALUE

DESCRIPTION

vbAbortRetryIgnore

2

Displays Abort, Retry, and Ignore buttons.

vbApplicationModal

0

Creates application modal message box.

vbCritical

16

Displays Critical Message icon.

vbDefaultButton1

0

Makes first button default.

vbDefaultButton2

256

Makes second button default.

vbDefaultButton3

512

Makes third button default.

vbDefaultButton4

768

Makes fourth button default.

vbExclamation

48

Displays Warning Message icon.

vbInformation

64

Displays Information Message icon.

vbMsgBoxHelpButton

16384

Adds a Help button.

VBA QUICK REFERENCE

VBA FUNCTION CONSTANTS AND CHARACTERS

vbMsgBoxStyle Constants (MsgBox Function) (Continued)

CONSTANT

VALUE

DESCRIPTION

vbMsgBoxRight

524288

Right aligns text in the box.

vbMsgBoxRtlReading

1048576

Used only with Hebrew and Arabic systems for right-to-left reading.

vbMsgBoxSetForeground

65536

Makes message box the foreground window.

vbOKCancel

1

Displays OK and Cancel buttons.

vbOKOnly

0

Displays only the OK button.

vbQuestion

32

Displays Warning Query icon.

vbRetryCancel

5

Displays Retry and Cancel buttons.

vbSystemModal

4096

Creates a system modal message box.

vbYesNo

4

Displays Yes and No buttons.

vbYesNoCancel

3

Displays Yes, No, and Cancel buttons.

vbDayOfWeek Constants

CONSTANT

VALUE

DESCRIPTION

vbUseSystemDayofWeek

0

Uses the system defined first day of week

vbSunday

1

Sunday (default)

vbMonday

2

Monday

vbTuesday

3

Tuesday

vbWednesday

4

Wednesday

vbThursday

5

Thursday

vbFriday

6

Friday

vbSaturday

7

Saturday

vbFirstWeekOfYear Constants

CONSTANT

VALUE

DESCRIPTION

vbUseSystem

0

Uses system defined first week of year.

vbFirstJanl

1

Starts with week in which January 1 occurs (default).

vbFirstFourDays

2

Starts with the first week that has at least four days in the new year.

vbFirstFullWeek

3

Starts with first full week of the year.

0 0

Post a comment