You are on page 1of 17

VBA KOMUTLARI

File and Folder Handling


STATEMENT
ChDir path
ChDrive drive
Close [filenumber]
FileCopy source, destination
Kill pathname
Lock [#]filenumber[, recordrange]
Open pathname For mode [Access access]
[lock] As [#]filenumber [Len=reclength]
MkDir path
Print #filenumber[, outputlist]
Put [#]filenumber, [recnumber,] varname
Reset
RmDir path
SetAttr pathname, attributes
Unlock [#]filenumber[, recordrange]
Width #filenumber, width
Write #filenumber[, outputlist]
Interaction
STATEMENT
AppActivate title[, wait]
DeleteSetting appname, section[, key]
SaveSetting appname, section, key, setting
SendKeys string[, wait]

Program Flow
STATEMENT
[Public | Private] Declare Sub name Lib
libname [Alias aliasname] [([arglist])]

DESCRIPTION
Changes to the specified folder location.
Changes to the specified drive.
Closes a file opened using the Open statement.
Copies a file from the source to the specified
destination.
Deletes files from a disk. Use wildcards * for multiple
characters and ? For single characters.
Locks all or a portion of an open file to prevent access
by other processes.
Opens the specified file to allow input/output
operations.
Creates a new directory or folder.
Writes display-formatted data sequentially to a file.
Writes data contained in a variable to a disk file.
Closes all files opened using the Open statement.
Removes the specified folder.
Sets the attribute information for the specified file.
Unlocks a file to allow access by other processes.
Assigns the output line width for a file opened using
the Open statement.
Writes data to a sequential text file.

DESCRIPTION
Activates an application window.
Deletes a section or key setting from an applications
entry in the Windows Registry.
Saves an application entry in the applications entry in
the Windows Registry.
Sends one or more keystrokes to the active window as
if they were typed on the keyboard.

DESCRIPTION
Declares a reference to an external DLL library
function.

Do [{While | Until} condition]


[statements]
Loop
Do
[statements]

Repeats a block of statements while or until a


condition is true. The condition is checked at the
beginning of the loop.

Loop [{While | Until} condition]

Repeats a block of statements while or until a


condition is true. Because the condition is checked at
the end of the loop, the block of statements always
executes at least once.

Exit Do | For | Function | Property | Sub

Exits the specified Do Loop, For Next, Function, Sub,


or Property code.
Repeats a block of statements for each element in an
array or collection.

For Each element In group


[statements]
Next [element]

VBA KOMUTLARI

1/17

For counter = start To end [Step step]


[statements]
Next [counter]

Repeats a section of code the specified number of


times.

[Public | Private | Friend] [Static] Function name Defines a procedure that returns a value.
[(arglist)] [As type]
[statements]
[name = expression]
End Function
If condition Then
[statements]
[ElseIf condition-n Then
[elseifstatements] . . .
[Else
[elsestatements]]
End If

Conditionally executes a block of statements based


upon the value of an expression.

[Public | Private | Friend] [Static] Property Get


name
[(arglist)] [As type]
[statements]
[name = expression]
End Property
[Public | Private | Friend] [Static] Property Let
name
([arglist,] value)
[statements]
End Property
[Public | Private | Friend] [Static] Property Set
name
([arglist,] reference)
[statements]
End Property
Select Case testexpression
[Case expressionlist-n
[statements-n]] . . .
[Case Else
[elsestatements]]
End Select

Declares the name and arguments procedure

[Private | Public | Friend] [Static] Sub name


[(arglist)]
[statements]
End Sub
While condition
[statements]
Wend

Declares the name, arguments, and code that


form a Sub procedure.

With object
[statements]
End With

Executes a block of statements on a single object


or on a user-defined data type.

VBA KOMUTLARI

Declares the name and arguments of a procedure that


assigns a value to a property.

Declares the name and arguments of a procedure that


sets a reference to an object.

Executes one block out of a series of statement


blocks depending upon the value of an expression.

Executes a block of statements as long as the


specified condition is true.

2/17

Variable Declaration
STATEMENT
DESCRIPTION
[Public | Private] Const constname [As type] = expression Declares a constant value.
Dim [WithEvents] varname[([subscripts])] [As [New] type]
Friend [WithEvents] varname[([subscripts])] [As [New]
type]
Option Compare {Binary | Text | Database}
Option Explicit
Option Private

Private [WithEvents] varname[([subscripts])] [As [New]


type]
Public [WithEvents] varname[([subscripts])] [As [New]
type]
ReDim [Preserve] varname(subscripts) [As type]
[Private | Public] Type varname
elementname [([subscripts])] As type
[elementname [([subscripts])] As type]
...
End Type

VBA KOMUTLARI

Declares variables and allocates the


appropriate storage space.
Declares a procedure or variable to only have
scope in the project where it is defined.
Specifies the default comparison method to
use when comparing strings.
Forces declaration of all variables within the
module.
Indicates that all code within the entire module
is Private. This option is used by default. You
can overwrite the effects of this option by
declaring a specific procedure Public.specific
procedure Public.
Declares variables and procedures to only
have scope within the current module.
Declares variables and procedures to have
scope within the entire project.
Changes the dimensions of a dynamic array.
Defines a custom data type.

3/17

Array Functions
FUNCTION
Array(arg1,arg2, arg3, . . .)
LBound(arrayname[, dimension])
UBound(arrayname[, dimension])

DESCRIPTION
Creates a variant array containing the specified
elements.
Returns the smallest subscript for the specified array.
Returns the largest subscript for the specified array.

Data Type Conversion Functions


FUNCTION
DESCRIPTION
Asc(string)
Returns the character code of the first letter in a string.
CBool(expression)
Converts an expression to Boolean data type (True or
False).
CByte(expression)
Converts an expression to Byte data type.
CCur(expression)
Converts an expression to Currency data type.
CDate(expression)
Converts an expression to a Date data type.
CDbl(expression)
Converts an expression to Double data type.
CDec(expression)
Converts an expression to a decimal value.

RETURNS
Variant
Long
Long

RETURNS
Integer
Boolean
Byte
Currency
Date
Double
Variant (Decimal)

Chr(charactercode)

Converts the character code to the corresponding character. Variant


Chr(9) returns a tab, Chr(34) returns quotation marks, etc.

CInt(expression)

Converts an expression to an Integer data type; rounding


any fractional parts.
Converts an expression to the Long data type.
Converts an expression to the Single data type.
Returns a string containing the specified expression.
Converts any data type to a Variant data type. All numeric
values are treated as Double data types and string
expressions are treated as String data types.

Integer

Format(expression[, format[,
firstdayofweek[,
firstweekofyear]]])

Formats the expression using either predefined or userdefined formats.

Variant

FormatCurrency(Expression[,
NumDigitsAfterDecimal
[, IncludeLeadingDigit
[,UseParensForNegativeNum
bers
[, GroupDigits]]]])
FormatDateTime(Date[,
NamedFormat])
FormatNumber (Expression
[, NumDigitsAfterDecimal
[, IncludeLeadingDigit
[,
UseParensForNegativeNumb
ers
[, GroupDigits]]]])
FormatPercent (Expression
[,NumDigitsAfterDecimal
[,IncludeLeadingDigit
[,UseParensForNegativeNum
bers
[,GroupDigits]]]])
Hex(number)

Formats the expression as a currency value using the


system-defined currency symbol.

Currency

Formats an expression as a date and time.

Date

Formats the expression as a number.

Mixed

Returns the expression formatted as a percentage with a


trailing % character.

String

Converts a number to a hexadecimal value. Rounds


numbers to nearest whole number before converting.
Converts a number to an octal value. Rounds numbers to
nearest whole number before converting.

String

CLng(expression)
CSng(expression)
CStr(expression)
CVar(expression)

Oct(number)
VBA KOMUTLARI

Long
Single
String
Variant

Variant (String)

4/17

Str(number)

Converts a number to a string using the Variant .data type

Variant (String)

Val(string)

Returns the numeric portion of a string formatted as a


number of the appropriate data type.

Mixed

Date and Time Functions


FUNCTION
Date

RETURNS
Date

DateAdd(interval, number, date)

DESCRIPTION
Returns the current system date.
Returns a date that is the specified interval of time from
the original date.

DateDiff(interval, date1, date2[,


firstdayofweek[,
firstweekofyear]])

Determines the time interval between two dates.

Long

Date

DatePart(interval, date[,
firstdayofweek[,
firstweekofyear]])
DateSerial(year, month, day)
DateValue(date)

Returns the specified part of a date.


Integer
Converts the specified date to a serial number.
Date
Converts a string to a date.
Date
Returns a whole number between 1 and 31 representing
Day(date)
the day of the month.
Integer
Returns a whole number between 0 and 23 representing
Hour(time)
the hour of the day.
Integer
Returns a whole number between 0 and 59 representing
Minute(time)
the minute of the hour.
Integer
Returns a whole number between 1 and 12 representing
Month(date)
the month of the year.
Integer
Now
Returns the current system date and time.
Date
Returns a whole number between 0 and 59 representing
Second(time)
the second of the minute.
Integer
Time
Returns the current system time.
Date
Indicates the number of seconds that have elapsed since
Timer
midnight
Single
Creates a time using the specified hour, minute, and
TimeSerial(hour, minute, second) second values.
Date
TimeValue(time)
Converts a time to the serial number used to store time.
Date
Returns a whole number representing the first day of the
WeekDay(date, [firstdayofweek]) week.
Integer
Returns a whole number representing the year portion of a
Year(date)
date.
Integer

File and Folder Handling Functions


FUNCTION
DESCRIPTION
CurDir(drive)
Returns the current path.
Returns the name of the file, directory, or folder that
Dir[(pathname[, attributes])]
matches the specified pattern.
EOF(filenumber)
Returns -1 when the end of a file has been reached.
Indicates the file mode used for files opened with the
FileAttr(filenumber, returntype)
Open statement.
FileDateTime(pathname)
Indicates the date and time when a file was last modified.
FileLen(pathname)
Indicates the length of a file in bytes.
Returns the next file number available for use by the Open
FreeFile(rangenumber)
statement.
Returns a whole number representing the attributes of a
GetAttr(pathname)
file, directory, or folder.
VBA KOMUTLARI

RETURNS
String
String
Integer
Long
Date
Long
Integer
Integer

5/17

Input (number, [#]filenumber)


Loc(filenumber)
LOF(filenumber)
Seek(filenumber)

Financial Functions
FUNCTION
DDB(cost, salvage, life, period[,
factor])
FV(rate, nper, pmt[, pv[, type]])
IPmt(rate, per, nper, pv[, fv[,
type]])
IRR(values(), [, guess])
MIRR(values(), finance_rate,
reinvest_rate)
NPer(rate, pmt, pv[, fv[, type]])
NPV(rate, values())
Pmt(rate, nper, pv[, fv[, type]])
PPmt(rate, per, nper, pv[, fv[,
type]])
PV(rate, nper, pmt[, fv[, type]])
Rate(nper, pmt, pv[, fv[, type[,
guess]]])
SLN(cost, salvage, life)
SYD(cost, salvage, life, period)

Information Functions
FUNCTION
CVErr(errornumber)
Error[(errornumber)]
IsArray(varname)
IsDate(expression)
IsEmpty(expression)
IsError(expression)

Returns a string containing the indicated number of


characters from the specified file.
Indicates the current read/write position in an open file.
Returns the size in bytes of a file opened using the Long
Open statement.
Specifies the current read/write position with a file opened
with the Open statement.

String
Long
Long
Long

DESCRIPTION
Specifies the depreciation value for an asset during a
specific time frame.
Determines the future value of an annuity based on
periodic fixed payments.
Determines the interest payment on an annuity for a
specific period of time.
Determines the internal rate of returns for a series of cash
flows.a series of cash flows.
Returns the modified interest rate of returns for a series of
periodic cash flows.
Returns the number of periods for an annuity.
Returns the net present value of an investment.
Returns the payment amount for an annuity based on
fixed payments.

RETURNS

Returns the principal payment amount for an annuity.


Returns the present value of an annuity.

Double
Double

Double
Double
Double
Double
Double
Double
Double
Double

Returns the interest rate per period for an annuity.


Double
Determines the straight-line depreciation of an asset for a
single period.
Double
Determines the sum-of-years digits depreciation of an
asset for a specified period.
Double

RETURNS
Variant
String
Boolean
Boolean
Boolean
Boolean

IsMissing(argname)
IsNull(expression)
IsNumeric(expression)
IsObject(identifier)
TypeName(varname)
VarType(varname)

DESCRIPTION
Returns a user-defined error number.
Returns the error message for the specified error number.
Indicates whether a variable contains an array.
Indicates whether an expression contains a date.
Indicates whether a variable has been initialized.
Indicates whether an expression is an error value.
Indicates whether an optional argument was passed to a
procedure.
Indicates whether an expression contains no valid data.
Indicates whether an expression is a number.
Indicates whether a variable references an object.
Specifies the variable type.
Specifies the subtype of a variable.

Interaction Functions
FUNCTION

DESCRIPTION

RETURNS

VBA KOMUTLARI

Boolean
Boolean
Boolean
Boolean
String
Integer

6/17

Choose(index, choice-1, [choice2, ...])


Selects and returns a value from a list of arguments.
Mixed
Yields execution so the operating system can process
DoEvents()
other events.
Integer
Evaluates the expression and returns either the truepart or
Iif(expr, truepart, falsepart)
falsepart parameter value.
Mixed
InputBox(prompt[, title] [, default]
[, xpos] [, ypos] [, helpfile,
context])
Displays a dialog box prompting the user for input.
Returns a list of key settings and their values from the
GetAllSettings(appname, section) Windows Registry.
Returns a reference to an object provided by an ActiveX
GetObject([pathname][, class])
Component.
GetSetting(appname, section,
Returns a key setting value from an applications entry in
key[, default])
the Windows registry.
MsgBox(prompt[, buttons] [, title] Displays a message box and returns a value representing
[, helpfile, context])
the button pressed by the user.
Partition(number, start,
Indicates where a number occurs within a series of
stop,interval)
ranges.
QBColor(color)
Returns the RGB color code for the specified color.
Switch(expr-1, value-1[, expr-2, Evaluates a list of expressions and returns a value
value-2 ...])
associated with the first True expression.
RGB(red, green, blue)
Returns a number representing the RGB color value.

Mathematical Functions
FUNCTION
Abs(number)
Atn(number)
Cos(number)

String
Variant
Variant
Variant
Integer
String
Long
Variant
Long

Exp(number)

DESCRIPTION
Returns the absolute value of a number.
Returns the arctangent of a number.
Returns the cosine of an angle.
Returns the base of the natural logarithms raised to a
power.

Fix(number)

Returns the integer portion of a number. With negative


values, returns first negative value greater than or equal to
number.
Integer

Int(number)
Log(number)
Round(expression [,
numdecimalplaces])
Rnd[(number)]
Sgn(number)
Sin(number)
Sqr(number)
Tan(number)

String Manipulation Functions


FUNCTION
nStr([start, ]string1, string2[,
compare])
InStrRev(stringcheck,
stringmatch[, start[, compare]])
LCase(string)
VBA KOMUTLARI

Returns the integer portion of a number. With negative


values, returns the first negative number less than or
equal to the number.
Returns the natural logarithm of a number.
Rounds a number to the specified number of decimal
places.
Returns a random number between 0 and 1.
Returns 1 for a number greater than 0, 0 for a value of 0,
and -1 number less than zero.
Specifies the sine of an angle.
Specifies the square root of a number.
Specifies the tangent of an angle.

DESCRIPTION

RETURNS
Mixed
Double
Double
Double

Integer
Double
Mixed
Single
Integer
Double
Double
Double

RETURNS

Specifies the position of one string within another string. Long


Specifies the position of one string within another starting
at the end of the string.
Long
Converts a string to lowercase.
String

7/17

Returns the specified number of characters from the left


side of a string.
Determines the number of characters in a string.
Trims spaces from the left side of a string.
Returns the specified number of characters from the
Mid(string, start[, length])
center of a string.
Returns the specified number of characters from the right
Right(string, length)
side of a string.
RTrim(string)
Trims spaces from the right side of a string.
Space(number)
Creates a string with the specified number of spaces.
ISpc(n)
Positions output when printing to a file.
Str(number)
Returns a string representation of a number.
StrComp(string1, string2[,
Returns a value indicating the result of a string
compare])
comparison.
StrConv(string, conversion, LCID) Converts a string to the specified format.
Creates a string by repeating a character the specified
String(number, character)
number of times.
Tab[(n)]
Positions output when printing to a file.
Trim(string)
Trims spaces from left and right of a string.
UCase(string)
Converts a string to uppercase.
Left(string, length)
Len(string | varname)
LTrim(string)

VBA KOMUTLARI

String
Long
String
String
String
String
String
String
String
Integer
String
String
String
String
String

8/17

VBA FUNCTION CONSTANTS AND CHARACTERS

vbMsgBoxStyle Constants (MsgBox Function)


CONSTANT
vbAbortRetryIgnore

VALUE
2

DESCRIPTION
Displays Abort, Retry, and Ignore buttons.

vbApplicationModal

Creates application modal message box.

vbCritical

16

Displays Critical Message icon.

vbDefaultButton1
vbDefaultButton2
vbDefaultButton3
vbDefaultButton4
vbExclamation

0
256
512
768
48

Makes first button default.


Makes second button default.
Makes third button default.
Makes fourth button default.
Displays Warning Message icon.

vbInformation

64

Displays Information Message icon.

vbMsgBoxHelpButton
vbMsgBoxRight
vbMsgBoxRtlReading

16384
524288
1048576

Adds a Help button.


Right aligns text in the box.
Used only with Hebrew and Arabic
systems for right-to-left reading.

vbMsgBoxSetForeground

65536

vbOKCancel

Makes message box the foreground


window.
Displays OK and Cancel buttons.

vbOKOnly
vbQuestion
vbRetryCancel

0
32
5

Displays only the OK button.


Displays Warning Query icon.
Displays Retry and Cancel buttons.

vbSystemModal

4096

Creates a system modal message box.

vbYesNo
vbYesNoCancel

4
3

Displays Yes and No buttons.


Displays Yes, No, and Cancel buttons.

vbDayOfWeek Constants
CONSTANT
vbUseSystemDayofWeek
vbSunday
vbMonday
vbTuesday
vbWednesday
vbThursday
vbFriday
vbSaturday

VALUE
0
1
2
3
4
5
6
7

DESCRIPTION
Uses the system defined first day of week
Sunday (default)
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday

vbFirstWeekOfYear Constants
CONSTANT
VALUE
vbUseSystem
0
VBA KOMUTLARI

DESCRIPTION
Uses system defined first week of year.

9/17

vbFirstJan1

Starts with week in which January 1


occurs (default).
Starts with the first week that has at least
four days in the new year.

vbFirstFourDays

vbFirstFullWeek

Format Function Characters


DATE/TIME CHARACTERS
d
ddd
dddd
ddddd
dddddd
w
ww
m
mmm
mmmm
q
y
yy
yyyy
h
n
s
ttttt
c

DISPLAYS
Day with no leading zero.
Three-letter abbreviation of day (Sun. Sat.).
Full day name (Sunday).
Complete date using short date format.
Complete date using long date format.
Day of week as number (1 for Sunday).
Week of year as number.
Month with no leading zero.
Three letter abbreviation of month (Jan.-Dec.).
Complete month name.
Quarter of year.
Day of year as number.
Year as 2-digit number.
Year as 4-digit number.
Hour with no leading zero.
Minutes with no leading zero.
Seconds with no leading zero.
Complete time using system time format.
Date as dddddd and time as ttttt.

Starts with first full week of the year.

Format Function Predefined Formats


FORMAT
DESCRIPTION
General Date
Uses general date format.
Long Date
Uses system-defined long date, such as Tuesday, August 7, 2001.
Medium Date
Uses the medium date format, such as 07-Aug-01.
Short Date
Uses system-defined short date, such as 8/7/2001.
Long Time
Uses system-defined long time, such as 5:45:30 P.M.
Medium Time
Uses the medium time format, such as 05:45 P.M.
Short Time
Uses the short time format, such as 17:45.
General Number Uses the general number format.
Currency
Places the appropriate currency symbol in front of the number.
Fixed
Uses a fixed decimal format.
Standard
Uses standard formatting.
Percent
Converts the expression to a percentage.
Scientific
Displays the expression using scientific notation.
Yes/No
Converts the expression to a Yes or No value.
True/False
Converts the expression to a True or False value.
On/Off
Converts the expression to an On or Off value.
XlColumnDataType Constants
CONSTANT
xlDMYFormat
VBA KOMUTLARI

VALUE

DESCRIPTION
4 DMY format date

10/17

xlDYMFormat
xlEMDFormat
xlGeneralFormat
xlMDYFormat
xlMYDFormat
xlSkipColumn
xlTextFormat
xlYDMFormat
xlYMDFormat

7 DYM format date


10 EMD format date
1 General format
3 MDY format date
6 MYD format date
9 Skip Column
2 Text format
8 YDM format date
5 YMD format date

Format Function Predefined Formats


FORMAT
DESCRIPTION
General Date
Uses general date format.
Long Date
Uses system-defined long date, such as Tuesday, August 7, 2001.
Medium Date
Uses the medium date format, such as 07-Aug-01.
Short Date
Uses system-defined short date, such as 8/7/2001.
Long Time
Uses system-defined long time, such as 5:45:30 P.M.
Medium Time
Uses the medium time format, such as 05:45 P.M.
Short Time
Uses the short time format, such as 17:45.
General Number Uses the general number format.
Currency
Places the appropriate currency symbol in front of the number.
Fixed
Uses a fixed decimal format.
Standard
Uses standard formatting.
Percent
Converts the expression to a percentage.
Scientific
Displays the expression using scientific notation.
Yes/No
Converts the expression to a Yes or No value.
True/False
Converts the expression to a True or False value.
On/Off
Converts the expression to an On or Off value.
XlColumnDataType Constants
CONSTANT
xlDMYFormat
xlDYMFormat
xlEMDFormat
xlGeneralFormat
xlMDYFormat
xlMYDFormat
xlSkipColumn
xlTextFormat
xlYDMFormat
xlYMDFormat

VALUE

DESCRIPTION
4 DMY format date
7 DYM format date
10 EMD format date
1 General format
3 MDY format date
6 MYD format date
9 Skip Column
2 Text format
8 YDM format date
5 YMD format date

XlFileFormat Constants
CONSTANT
VALUE DESCRIPTION
xlAddIn
18 Excel add-in.
xlCSV
6 Comma-separated values format.
xlCSVMac
22 Macintosh comma-separated values format.
xlCSVMSDOS
24 MSDOS comma-separated values format.
xlCSVWindows
23 MS Windows comma-separated values format.
xlCurrentPlatformText
-4158 Text file based on current operating system.
xlDBF2
7 DBase II format.
VBA KOMUTLARI

11/17

xlDBF3
xlDBF4
xlDIF
xlExcel2
xlExcel2FarEast
xlExcel3
xlExcel4
xlExcel4Workbook
xlExcel5
xlExcel7
xlExcel9795
xlHtml
xlIntlAddIn
xlIntlMacro
xlSYLK
xlTemplate
xlTextMac
xlTextMSDOS
xlTextPrinter
xlTextWindows
xlUnicodeText
xlWebArchive
xlWK1
xlWK1ALL
xlWK1FMT
xlWK3
xlWK3FM3
xlWK4
xlWKS
xlWorkbookNormal
xlWorks2FarEast
xlWQ1
xlXMLSpreadsheet

8 DBase III format.


11 DBase IV format.
9 Data interchange format.
16 Excel 2.0 format.
27 Excel 2.0 format Far East version.
29 Excel 3.0 format.
33 Excel 4.0 format.
35 Excel 4.0 workbook format.
39 Excel 5.0 format.
39 Excel 97 format.
43 Excel 95 97 format.
44 HTML format.
26 Excel international Add-in.
25 Excel international macro.
2 Symbolic link format.
17 Template file format.
19 Macintosh text file format.
21 MSDOS text file format.
36 Text file created for a printer (.prn).
20 MS Window text file format.
42 Unicode text file format.
45 Web archive format (.mht).
5 Lotus 2.x format.
31 Lotus 2.x .all format.
30 Lotus 2.x .fmt format.
15 Lotus 3.x format.
32 Lotus 3.x and Lotus 1-2-3 for Windows format.
38 Lotus 4.0 format.
4 MS Works file format.
-4143 Excel workbook format.
28 MS Works file Far East format.
34 Quattro Pro for MSDOS format.
46 XML format.

MsoFileType Constants
CONSTANT
VALUE DESCRIPTION
msoFileTypeAllFiles
1 All file types.
msoFileTypeBinders
6 Microsoft Office Binder file.
msoFileTypeCalendarItem
11 Microsoft Outlook Calendar item.
msoFileTypeContactItem
12 Microsoft Outlook Contact item.
msoFileTypeDatabases
7 Database files.
msoFileTypeDataConnectionFiles
17 Database connection files.
msoFileTypeDesignerFiles
22 Designer files.
msoFileTypeDocumentImagingFiles
20 Document imaging files.
msoFileTypeExcelWorkbooks
4 Microsoft Excel Workbooks.
msoFileTypeJournalItem
14 Journal items.
msoFileTypeMailItem
10 Microsoft Outlook Mail message.
msoFileTypeNoteItem
13 Microsoft Outlook Note item.
msoFileTypeOfficeFiles
2 All Microsoft Office file types.
msoFileTypeOutlookItems
9 Microsoft Outlook files.
msoFileTypePhotoDrawFiles
16 Microsoft PhotoDraw files.
msoFileTypePowerPointPresentations
5 Microsoft PowerPoint files.
msoFileTypeProjectFiles
19 Microsoft Project files.
msoFileTypePublisherFiles
18 Microsoft Publisher files.
VBA KOMUTLARI

12/17

msoFileTypeTaskItem
msoFileTypeTemplates
msoFileTypeVisioFiles
msoFileTypeWebPages
msoFileTypeWordDocuments
XlChartType Constants
CONSTANT
xl3DArea
xl3DAreaStacked
xl3DAreaStacked100
xl3DBarClustered
xl3DBarStacked
xl3DBarStacked100
xl3DColumn
xl3DColumnClustered
xl3DColumnStacked
xl3DColumnStacked100
xl3DLine
xl3DPie
xl3DPieExploded
xlArea
xlAreaStacked
xlAreaStacked100
xlBarClustered
xlBarOfPie
xlBarStacked
xlBarStacked100
xlBubble
xlBubble3DEffec
xlColumnClustered
xlColumnStacked
xlColumnStacked100
xlConeBarClustered
xlConeBarStacked
xlConeBarStacked100
xlConeCol
xlConeColClustered
xlConeColStacked
xlConeColStacked100
xlCylinderBarClustered
xlCylinderBarStacked
xlCylinderBarStacked100
xlCylinderCol
xlCylinderColClustered
xlCylinderColStacked
xlCylinderColStacked100
xlDoughnut
xlDoughnutExploded
xlLine
xlLineMarkers
xlLineMarkersStacked
xlLineMarkersStacked100
xlLineStacked
VBA KOMUTLARI

15 Microsoft Outlook Task item.


8 Template files.
21 Visio files.
23 Web pages including .htm, .asp, and .mht files.
3 Microsoft Word documents.

VALUE CHART TYPE


-4098 3D Area
78 3D Stacked Area
79 100% Stacked Area
60 3D Clustered Bar
61 3D Stacked Bar
62 3D 100% Stacked Bar
-4100 3D Column
54 3D Clustered Column
55 3D Stacked Column
56 3D 100% Stacked Column
-4101 3D Line
-4102 3D Pie
70 Exploded 3D Pie
1 Area
76 Stacked Area
77 100% Stacked Area
57 Clustered Bar
71 Bar of Pie
58 Stacked Bar
59 100% Stacked Bar
15 Bubble
87 Bubble with 3D effects
51 Clustered Column
52 Stacked Column
53 100% Stacked Column
102 Clustered Cone Bar
103 Stacked Cone Bar
104 100% Stacked Cone Bar
105 3D Cone Column
99 Clustered Cone Column
100 Stacked Cone Column
101 100% Stacked Cone Column
95 Clustered Cylinder Bar
96 Stacked Cylinder Bar
97 100% Stacked Cylinder Bar
98 3D Cylinder Column
92 Clustered Cone Column
93 Stacked Cone Column
94 100% Stacked Cylinder Column
-4120 Doughnut
80 Exploded Doughnut
4 Line
65 Line with Markers
66 Stacked Line with Markers
67 100% Stacked Line with Markers
63 Stacked Line

13/17

xlLineStacked100
xlPie
xlPieExploded
xlPieOfPie
xlPyramidBarClustered
xlPyramidBarStacked
xlPyramidBarStacked100
xlPyramidCol
xlPyramidColClustered
xlPyramidColStacked
xlPyramidColStacked100
xlRadar
xlRadarFilled
xlRadarMarkers
xlStockHLC
xlStockOHLC
xlStockVHLC
xlStockVOHLC
xlSurface
xlSurfaceTopView
xlSurfaceTopViewWireframe
xlSurfaceWireframe
xlXYScatter
xlXYScatterLines
xlXYScatterLinesNoMarkers
xlXYScatterSmooth
xlXYScatterSmoothNoMarkers

64 100% Stacked Line


5 Pie
69 Exploded Pie
68 Pie of Pie
109 Clustered Pyramid Bar
110 Stacked Pyramid Bar
111 100% Stacked Pyramid Bar
112 3D Pyramid Column
106 Clustered Pyramid Column
107 Stacked Pyramid Column
108 100% Stacked Pyramid Column
-4151 Radar
82 Filled Radar
81 Radar with Data Markers
88 High-Low-Close
89 Open-High-Low-Close
90 Volume-High-Low-Close
91 Volume-Open-High-Low-Close
83 3D Surface
85 Top View Surface
86 Top View wireframe Surface
84 3D Surface wireframe
-4169 Scatter
74 Scatter with Lines.
75 Scatter with Lines and No Data Markers
72 Scatter with Smoothed Lines
73 Scatter with Smoothed Lines and No Data Markers

XlLineStyle Constants
CONSTANT
VALUE
DESCRIPTION
xlContinuous
1 Continuous solid line.
xlDash
4155 Dashed line.
xlDashDot
4 Line with the pattern dash dot.
xlDashDotDot
5 Line with the pattern dash dot dot.
xlDot
4118 Dotted line.
xlDouble
4119 Double solid line.
xlSlantDashDot
13 Slanted line with the pattern dash dot.
xlineStyleNone
4142 No line.
XlBorderWeight Constants
CONSTANT
VALUE
DESCRIPTION
xlHairline
1 Creates a very thin line.
xlMedium
-4138 Creates a medium width line.
xlThick
4 Creates a thick line.
xlThin
2 Creates a thin line.

XlPattern Constants
CONSTANT
xlPatternAutomatic
xlPatternChecker
xlPatternCrissCross
xlPatternDown
xlPatternGray16
VBA KOMUTLARI

VALUE
DESCRIPTION
-4105 System default.
9 Checkered pattern.
16 Criss-cross pattern.
-4121 Downward pattern.
17 16% gray pattern.

14/17

xlPatternGray25
xlPatternGray50
xlPatternGray75
xlPatternGray8
xlPatternGrid
xlPatternHorizontal
xlPatternLightHorizontal
xlPatternLightVertical
xlPatternLightDown
xlPatternLightUp
xlPatternNone
xlPatternSemiGray75
xlPatternSolid
xlPatternUp
xlPatternVertical

Excel CommandBars
CONSTANT
NAME
1
Worksheet Menu Bar
2
Chart Menu Bar
3
Standard
4
Formatting
5
PivotTable
6
Chart
7
Reviewing
8
Forms
9
Stop Recording
10
External Data
11
Formula Auditing
12
Full Screen
13
Circular Reference
14
Visual Basic
15
Web
16
Control Toolbox
17
Exit Design Mode
18
Refresh
19
Watch Window
20
PivotTable Field List
21
Borders
22
Protection
23
Text To Speech
24
Drawing
25
Query and Pivot
26
PivotChart Menu
27
Workbook tabs
28
Cell
29
Column
30
Row
31
Cell
32
Column
33
Row
34
Ply
35
XLM Cell
VBA KOMUTLARI

-4124 25% gray pattern.


-4125 50% gray pattern.
-4126 75% gray pattern.
18 8% gray pattern.
15 Grid pattern.
-4128 Horizontal pattern.
11 Light horizontal pattern.
12 Light vertical pattern.
13 Light downward pattern.
14 Light upward pattern.
-4142 No pattern.
10 75% semi-gray pattern.
1 Solid color, no pattern.
-4162 Upward pattern.
-4166 Vertical pattern.

TYPE
Menu Bar
Menu Bar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu

15/17

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
VBA KOMUTLARI

Document
Desktop
Nondefault Drag and Drop
AutoFill
Button
Dialog
Series
Plot Area
Floor and Walls
Trendline
Chart
Format Data Series
Format Axis
Format Legend Entry
Formula Bar
PivotTable Context Menu
Query
Query Layout
AutoCalculate
Object/Plot
Title Bar (Charting)
Layout
Pivot Chart Popup
Phonetic Information
Auto Sum
Paste Special Dropdown
Find Format
Replace Format
WordArt
Picture
Shadow Settings
3-D Settings
Drawing Canvas
Organization Chart
Diagram
Borders
Borders
Draw Border
Chart Type
Pattern
Font Color
Fill Color
Line Color
Order
Nudge
Align or Distribute
Rotate or Flip
Lines
Connectors
AutoShapes
Callouts
Flowchart
Block Arrows
Stars & Banners
Basic Shapes

Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar
Toolbar

16/17

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

VBA KOMUTLARI

Insert Shape
Shapes
Inactive Chart
Excel Control
Curve
Curve Node
Curve Segment
Pictures Context Menu
OLE Object
ActiveX Control
WordArt Context Menu
Rotate Mode
Connector
Script Anchor Popup
Canvas Popup
Organization Chart Popup
Diagram
Layout
Select
Task Pane
Add Command
Built-in Menus
System
Clipboard
Envelope
Online Meeting

Toolbar
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Shortcut Menu
Toolbar
Shortcut Menu
Shortcut Menu
Shortcut Menu
Toolbar
Toolbar
Toolbar

17/17

You might also like