保留字就是不允许用户重新定义进行其它功能使用的单词,比如if只用在条件语句里面,不允许dim if来定义一个叫做if的变量。一般有下面这些:
ByVal Call Case
Catch CByte CBool
CChar CDbl CStr Decimal Delegante Do Else Enum Event Finally CDate Char CType Declre Dim Double Elseif Erase Exit For Cdec
CInt
Date
Default
DirectCast
Each
Error
False
Friend
End
Function Get GetType
GoTo Handles If
Implements Imports In
Inherits Integer Interface
Is Let Lib
Like Long Loop
Me Mod Module
MustInherit MustOverride MyBase
MyClass Namespace New
Next Not Nothing
NotInheritable NotOverridble Object
On Option Optional
Or OrElse Overloads
Overridable Overrides ParamArray
Preserve Private Property
Protected Public RaiseEvent
ReadOnly ReDim REM
RemoverHandleer Resume Return
Select Set Shadows
Shared Short Single
Static Step Stop
String Structure Sub
SyncLock Then Throw
To True Try
TypeOf nicode Until
Variant When While
With WithEvents WriteOnly
Xor