Example: bachelor of science

Visual Basic Quick Reference - cheat sheets

On Error GoTo 0. Split(expression[, delimiter[, count[, compare]]]). Visual Basic Quick Reference Join(list[, delimiter]). Author: Jialong He File Operation Replace(expression, find, replacewith[, start[, count[, compare]]]) Open pathname For mode [Access access] [lock] As [#]. Email: StrComp(string1, string2[, compare]). ~jialong_he filenumber [Len=reclength]. Filter(InputStrings, Value[, Include[, Compare]]). StrReverse(string1) Input #filenumber, varlist Operators Print #filenumber, [outputlist]. +, -, *, / Addition, subtraction, multiplication, division InStr([start, ]string1, string2[, compare]). \ Integer Division InstrRev(string1, string2[, start[, compare]]) Line Input #filenumber, varname Mod Remainder Write #filenumber, [outputlist]. ^ Exponent & String concatenation Program Flow Get [#]filenumber, [recnumber], varname =, >, <, >=, <= Comparison Put [#]filenumber, [recnumber], varname For counter = start To end [Step step].

reference) [statements] [Exit Property] [statements] End Property System and Miscellaneous AppActivate title[, wait] Make a windows focus SendKeys string[, wait] Send key stroks to current app Shell(pathname[, windowstyle]) Run an external program Timer seconds elapsed since midnight Command Command line Beep Beep on internal speaker

Tags:

  Reference, Quick, Quick reference

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Visual Basic Quick Reference - cheat sheets

1 On Error GoTo 0. Split(expression[, delimiter[, count[, compare]]]). Visual Basic Quick Reference Join(list[, delimiter]). Author: Jialong He File Operation Replace(expression, find, replacewith[, start[, count[, compare]]]) Open pathname For mode [Access access] [lock] As [#]. Email: StrComp(string1, string2[, compare]). ~jialong_he filenumber [Len=reclength]. Filter(InputStrings, Value[, Include[, Compare]]). StrReverse(string1) Input #filenumber, varlist Operators Print #filenumber, [outputlist]. +, -, *, / Addition, subtraction, multiplication, division InStr([start, ]string1, string2[, compare]). \ Integer Division InstrRev(string1, string2[, start[, compare]]) Line Input #filenumber, varname Mod Remainder Write #filenumber, [outputlist]. ^ Exponent & String concatenation Program Flow Get [#]filenumber, [recnumber], varname =, >, <, >=, <= Comparison Put [#]filenumber, [recnumber], varname For counter = start To end [Step step].

2 NOT, AND, OR Boolean operators [statements]. [Exit For] Loc(filenumber). Data Types [statements] Seek [#]filenumber, position Variant, Integer (%), Long(&), Single (!), Double (#), Byte, Next [counter]. Boolean, Date, Currency (@), String ($) Eof(filenumber). For Each element In group Lof(filenumber). CBool(expr), CByte(expr), CCur(expr), CDate(expr), CDbl(expr), [statements]. CDec(expr), CInt(expr), CLng(expr), CSng(expr), CStr(expr), [Exit For] Reset CVar(expr) [statements] Close [filenumberlist]. Next [element]. [Public | Private] Const constname [As type] = expression Lock [#]filenumber[, recordrange]. If condition Then [statements] [Else elsestatements] Unlock [#]filenumber[, recordrange]. Dim [WithEvents] varname [([subscripts])] [As [New] type]. Or, you can use the block form syntax: ReDim [Preserve] varname (subscripts) [As type] If condition Then Function and Procedure [statements] [Public | Private | Friend] [Static] Function name[(arglist)] [As [Public | Private] Enum name [ElseIf condition-n Then type].]

3 [elseifstatements] [statements]. [Private | Public] Type varname [Else [Exit Function]. elementname [([subscripts])] As type [elsestatements]] [statements]. [elementname [([subscripts])] As type] End If End Function .. End Type Do [{While | Until} Do [Private | Public | Friend] [Static] Sub name [(arglist)]. condition] [statements] [statements]. Set objectvar = {[New] objectexpression | Nothing} [statements] [Exit Do] [Exit Sub]. [Exit Do] [statements] [statements]. Static varname[([subscripts])] [As [New] type] [statements] Loop [{While | Until} End Sub Loop condition]. [Public | Private] Declare Sub name Lib "libname" [Alias Math Functions Select Case testexpression "aliasname"] [([arglist])]. Abs(num), Atn(num), Cos(num), Log(num), Rnd[(num)], [Case expressionlist-n Randomize, Sin(num), Sqr(num), Tan(num) [statements-n]] .. [Public | Private] Declare Function name Lib "libname" [Alias [Case Else "aliasname"] [([arglist])] [As type].]

4 FV(rate, nper, pmt[, pv[, type]]) [elsestatements]]. NPV(rate, values()) End Select [Call] name [[ByVal] argumentlist]. PV(rate, nper, pmt[, fv[, type]]). Pmt(rate, nper, pv[, fv[, type]]) While condition PPmt(rate, per, nper, pv[, fv[, type]]) [statements]. Wend Property Procedure [Public | Private | Friend] [Static] Property Get name String Functions With object [(arglist)] [As type]. Left(string, length), Right(string, length), Mid(string, start[, length]) [statements]. [statements]. UCase(string), LCase(string), Len(string) End With [Exit Property]. LTrim(string), RTrim(string), Trim(string) [statements]. Asc(string), Val(string), Oct(number), Hex(number) On Error GoTo line End Property On Error Resume [0|line|Next]. Properties Comments, CompanyName, EXEName, KeyUp, KeyPress, LostFocus, MouseDown, [Public | Private | Friend] [Static] Property Let name FileDescription, HelpFile, LegalCopyright, MouseUp, MouseMove, OLEC ompleteDrag, ([arglist,] value) LegalTrademarks, LogMode, LogPath, Major, OLEDragDrop, OLEDragOver, [statements] Minor, NonModalAllowed, OLEGiveFeedback, OLESetData, OLES tartDrag, [Exit Property] OLER equestPendingMsgText, Validate [statements] OLER equestPendingMsgTitle, End Property OLER equestPendingTimeout, OLES erverBusyMsgText, ComboBox [Public | Private | Friend] [Static] Property Set name ([arglist,] OLES erverBusyMsgTitle, Properties Appearance, BackColor, ForeColor, Container, Reference )

5 OLES erverBusyRaiseError, DataChanged, DataField, DataFormat, [statements] OLES erverBusyTimeout, Path, PrevInstance, DataMember, DragIcon, DragMode, Enabled, [Exit Property] ProductName, RetainedProject, Revision, Font, FontBold, FontItalic, FontStrikethru, [statements] StartMode, TaskVisible, ThreadID, Title, FontUnderline, FontName, FontSize, Height, End Property UnattendedApp, hInstance Width, HelpContextID, Index, IntegralHeight, ItemData, Left, Top, List, ListCount, ListIndex, Methods LogEvent, StartLogging Locked, MouseIcon, MousePointer, Name, System and Miscellaneous NewIndex, OLEDragMode, OLEDropMode, AppActivate title[, wait] Make a windows focus Parent, RightToLeft, RightToLeft, SelLength, SendKeys string[, wait] Send key stroks to current app Printer SelStart, SelText, SelLength, SelStart, SelText, Shell(pathname[, windowstyle]) Run an external program Properties ColorMode, Copies, Count, CurrentX, CurrentY, Sorted, Style, TabIndex, TabStop, Tag, Text, Timer seconds elapsed since midnight DeviceName, DrawMode, DrawStyle, DrawWidth, ToolTipText, TopIndex, Visible, WhatsThisHelpID, Command Command line DriverName, Duplex, FillColor, FillStyle, Font, hWnd Beep Beep on internal speaker FontBold, FontItalic, FontStrikethru, Option Base {0 | 1} Array base FontUnderline, FontCount, FontName, FontSize, Methods AddItem, Clear, Drag, Move, OLEDrag, Refresh, Option Explicit Force explicit declaration FontTransparent, Fonts, Height, Width, RemoveItem, SetFocus, ShowWhatsThis, ZOrder ChDir path Change current directory Orientation, Page, PaperBin, PaperSize, Port, MkDir path Make a directory PrintQuality, RightToLeft, ScaleHeight, Events Change, Click, DblClick, DragDrop, DragOver.

6 RmDir path Remove a directory ScaleWidth, ScaleLeft, ScaleTop, ScaleMode, DropDown, GotFocus, KeyDown, KeyUp, ChDrive drive Change current drive TrackDefault, TwipsPerPixelX, TwipsPerPixelY, KeyPress, LostFocus, OLEC ompleteDrag, Kill filename Delete a file Zoom, hDC OLEDragDrop, OLEDragOver, FileCopy source, destination Copy a file OLEGiveFeedback, OLESetData, OLES tartDrag, Name old As new Rename a file Methods Circle, EndDoc, KillDoc, Line, NewPage, PSet, Scroll, Validate FileLen(pathname) File size PaintPicture, Scale, ScaleX, ScaleY, TextHeight, FileDateTime(pathname) File creation date TextWidth Date Get/Set system date CommandButton Time Get/Set system time Properties Appearance, BackColor, ForeColor, Cancel, Environ({envstring | number}) Environment string Timer Caption, Container, Default, DisabledPicture, Error[(errornumber)] Error description string Properties DownPicture, DragIcon, DragMode, Enabled, Enabled, Index, Interval, Left, Top, Name, Parent, ' comment Rem comment Font, FontBold, FontItalic, FontStrikethru, Tag space_ Continue line FontUnderline, FontName, FontSize, Height, InputBox(prompt[, title] [, default] [, xpos] [, ypos] [, helpfile, Width, HelpContextID, Index, Left, Top, context]) MaskColor, MouseIcon, MousePointer, Name, MsgBox(prompt[, buttons] [, title] [, helpfile, context]) Standard Controls OLEDropMode, Parent, Picture, RightToLeft, CheckBox Style, TabIndex, TabStop, Tag, ToolTipText, GetSetting(appname, section, key[, default]) Properties Alignment, Appearance, BackColor, ForeColor, UseMaskColor, Value, Visible, WhatsThisHelpID, SaveSetting appname, section, key, setting Caption, Container, DataChanged, DataField, hWnd GetAllSettings(appname, section)

7 DataFormat, DataMember, DisabledPicture, DeleteSetting appname, section[, key] DownPicture, DragIcon, DragMode, Enabled, Methods Drag, Move, OLEDrag, Refresh, ShowWhatsThis, Font, FontBold, FontItalic, FontStrikethru, UpdateControls, UpdateRecord, ZOrder CreateObject(class, [servername]) FontUnderline, FontName, FontSize, Height, Events Click, DragDrop, DragOver, GotFocus, KeyDown, GetObject([pathname] [, class]) Width, HelpContextID, Index, Left, Top, Load object MaskColor, MouseIcon, MousePointer, Name, KeyUp, KeyPress, LostFocus, MouseDown, Unload object OLEDropMode, Parent, Picture, RightToLeft, MouseUp, MouseMove, OLEC ompleteDrag, RightToLeft, Style, TabIndex, TabStop, Tag, OLEDragDrop, OLEDragOver, LoadPicture([filename], [size], [colordepth],[x,y]) ToolTipText, UseMaskColor, Value, Visible, OLEGiveFeedback, OLESetData, OLES tartDra SavePicture picture, stringexpression WhatsThisHelpID, hWnd Methods Drag, Move, OLEDrag, Refresh, SetFocus, Data Objects ShowWhatsThis, ZOrder Properties Align, Appearance, BOFA ction, EOFA ction, App BackColor, ForeColor, Caption, Connect, Events Click, DragDrop, DragOver, GotFocus, KeyDown, Database, DatabaseName, DefaultCursorType, DefaultType, DragIcon, DragMode, EditMode, KeyDown, KeyUp, KeyPress, LostFocus, Scroll, Enabled, Exclusive, Font, FontBold, FontItalic, Validate FontStrikethru, FontUnderline, FontName, FileListBox FontSize, Height, Width, Index, Left, Top, Properties Appearance, Archive, Hidden, Normal, System, MouseIcon, MousePointer, Name, OLEDropMode, BackColor, ForeColor, Container, DragIcon, Image Options, Parent, ReadOnly, RecordSource, DragMode, Enabled, FileName.

8 Font, FontBold, Properties Appearance, BorderStyle, Container, Recordset, RecordsetType, RightToLeft, FontItalic, FontStrikethru, FontUnderline, DataChanged, DataField, DataFormat, RightToLeft, Tag, ToolTipText, Visible, FontName, FontSize, Height, Width, DataMember, DataSource, DragIcon, DragMode, WhatsThisHelpID HelpContextID, Index, Left, Top, List, ListCount, Enabled, Height, Width, Index, Left, Top, ListIndex, Locked, MouseIcon, MousePointer, MouseIcon, MousePointer, Name, OLEDragMode, Methods Drag, Move, OLEDrag, Refresh, ShowWhatsThis, MultiSelect, Name, OLEDragMode, OLEDropMode, Parent, Picture, Stretch, Tag, UpdateControls, UpdateRecord, ZOrder OLEDropMode, Parent, Path, Pattern, ReadOnly, ToolTipText, Visible, WhatsThisHelpID. Selected, TabIndex, TabStop, Tag, ToolTipText, Events DragDrop, DragOver, Error, MouseDown, TopIndex, Visible, WhatsThisHelpID, hWnd Methods Drag, Move, OLEDrag, Refresh, ShowWhatsThis, MouseUp, MouseMove, OLEC ompleteDrag, ZOrder OLEDragDrop, OLEDragOver, Methods Drag, Move, OLEDrag, Refresh, SetFocus, OLEGiveFeedback, OLESetData, OLES tartDrag, ShowWhatsThis, ZOrder Events Click, DblClick, DragDrop, DragOver, Reposition, Resize, Validate MouseDown, MouseUp, MouseMove, Events Click, DblClick, DragDrop, DragOver, GotFocus, OLEC ompleteDrag, OLEDragDrop, KeyDown, KeyUp, KeyPress, LostFocus, OLEDragOver, OLEGiveFeedback, OLESetData, DirListBox MouseDown, MouseUp, MouseMove, OLES tartDrag Properties Appearance, BackColor, ForeColor, Container, OLEC ompleteDrag, OLEDragDrop, DragIcon, DragMode, Enabled, Font, FontBold, OLEDragOver, OLEGiveFeedback, OLESetData, FontItalic.

9 FontStrikethru, FontUnderline, OLES tartDrag, PathChange, PatternChange, Label FontName, FontSize, Height, Width, Scroll, Validate Properties Alignment, Appearance, AutoSize, BackColor, HelpContextID, Index, Left, Top, List, ListCount, ForeColor, BackStyle, BorderStyle, Caption, ListIndex, MouseIcon, MousePointer, Name, Container, DataChanged, DataField, DataFormat, OLEDragMode, OLEDropMode, Parent, Path, Frame DataMember, DataSource, DragIcon, DragMode, TabIndex, TabStop, Tag, ToolTipText, TopIndex, Properties Appearance, BackColor, ForeColor, BorderStyle, Enabled, Font, FontBold, FontItalic, Visible, WhatsThisHelpID, hWnd Caption, ClipControls, Container, DragIcon, FontStrikethru, FontUnderline, FontName, DragMode, Enabled, Font, FontBold, FontItalic, FontSize, Height, Width, Index, Left, Top, Methods Drag, Move, OLEDrag, Refresh, SetFocus, FontStrikethru, FontUnderline, FontName, LinkItem, LinkMode, LinkTimeout, LinkTopic, ShowWhatsThis, ZOrder FontSize, Height, Width, HelpContextID, Index, MouseIcon, MousePointer, Name, OLEDrag Left, Top, MouseIcon, MousePointer, Name, Method, OLEDropMode, Parent, RightToLeft, Events Change, Click, DragDrop, DragOver, GotFocus, OLEDropMode, Parent, RightToLeft, TabIndex, TabIndex, Tag, ToolTipText, UseMnemonic, KeyDown, KeyUp, KeyPress, LostFocus, Tag, ToolTipText, Visible, WhatsThisHelpID, Visible, WhatsThisHelpID, WordWrap MouseDown, MouseUp, MouseMove, hWnd OLEC ompleteDrag, OLEDragDrop, Methods Drag, LinkExecute, LinkPoke, LinkRequest, OLEDragOver, OLEGiveFeedback, OLESetData, Methods Drag, Move, OLEDrag, Refresh, ShowWhatsThis, LinkSend, Move, OLEDrag, Refresh, OLES tartDrag, Scroll, Validate ZOrder ShowWhatsThis, ZOrder Events Click, DblClick, DragDrop, DragOver, Events Change.

10 Click, DblClick, DragDrop, DragOver, DriveListBox MouseDown, MouseUp, MouseMove, LinkClose, LinkError, LinkNotify, LinkOpen, Properties Appearance, BackColor, ForeColor, Container, OLEC ompleteDrag, OLEDragDrop, MouseDown, MouseUp, MouseMove, DragIcon, DragMode, Drive, Enabled, Font, OLEDragOver, OLEGiveFeedback, OLESetData, OLEC ompleteDrag, OLEDragDrop, FontBold, FontItalic, FontStrikethru, OLES tartDrag OLEDragOver, OLEGiveFeedba