Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

26 Summary of functions


'Functions available within VB can be broadly broken into the following categories:

'Strings    Files  Folders     Declarations
'Date/Time    Registry  Misc    Arrays
'Math/Logic    Error Handling    Flow Control


'Strings           
Left       Mid        String
Right   Chr       InstrRev
Trim      Len        Asc         
LTrim      Lset      Space  
RTrim      Rset      Replace
Ucase      Format    StrComp
Lcase     Instr     StrReverse
FormatCurrency      StrConv
FormatDateTime                  
FormatNumber
FormatPerCent


'Files / Folders            
Dir       FileDateTime    FreeFile       Get       Line Input
ChDir     FileLen           Open         Put        Write
MkDir     FileCopy          Close       Seek       Print
ChDrive   Lock             Reset        Input     Spc
CurDir    UnLock           Lof         Loc       Tab
Name      GetAttr          Eof
Kill      SetAttr          Width
RmDir     FileAttr


'Declarations                        
Sub          Call                 Set
Function   CallByName           Let
Dim         PropertyGet          Event
Redim      PropertySet         ArrayName
Static      PropertyLet          Implements
Public       Option Explicit      Friend
Private      Option Private       Enum
Const        Option Compare      TypeName
Declare     Type ...End Type      VarType
Is          GetObject           DefType.
           CreateObject                           
           GetAutoServerSettings

'Date/Time
Date           MonthName
Time           WeekDayName
Now           Day
Timer          Hour
DateAdd     Minute
DateDiff     Second
DateSerial   TimeSerial
DateValue    TimeValue
Year           WeekDay
Month

'Registry
GetSetting
SaveSetting
DeleteSetting
GetAllSettings

'Miscellaneous
MsgBox      Beep            Load
DoEvents    InputBox        Unload
Shell        AddressOf      SavePicture
Command      RaiseEvent     LoadPicture
Environ      Load           LoadResData
RGB          Me             LoadResString
QBColor     SendKeys       AppActivate

'Arrays
Option Base
Erase
Dim
Redim
Ubound
Lbound
Filter
Array


'Math/Logic
------------------------------------------------------------------
Hex      Rnd     Sqr         Mod
Oct      Sgn     Abs         And
Val      Sin     Atn        Or   
Round    Cos     Log         Xor
Int      Tan                Not
Fix      Randomize     Eqv
Partition             Like
Round                 Imp
CInt ...               Is         
Format
FormatNumber
FormatPerCent

'Error Handling
On Error
Resume
Resume Next
Resume Line

                                     
'Flow Control
While (cond)
...
Wend

Do While | Until (cond)
...
Loop While | Until (cond)

For Each X In Collection| Array
...
Next X

For i = 1 To j Step k
...
Next i

If (expression) Then
...
End If

Select Case (expression)
  Case (cond)
  Case (cond)
End Select