Example: barber

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].

DataMember, DataSource, DragIcon, DragMode, Enabled, Font, FontBold, FontItalic, FontStrikethru, FontUnderline, FontName, FontSize, Height, Width, HelpContextID, Index,

Tags:

  Basics, Visual, Visual basic

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].

2 ^ Exponent & String concatenation Program Flow Get [#]filenumber, [recnumber], varname =, >, <, >=, <= Comparison Put [#]filenumber, [recnumber], varname For counter = start To end [Step step]. 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].

3 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]. [elseifstatements] [statements]. [Private | Public] Type varname [Else [Exit Function]. elementname [([subscripts])] As type [elsestatements]] [statements].]

4 [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]].

5 [Public | Private] Declare Function name Lib "libname" [Alias [Case Else "aliasname"] [([arglist])] [As type]. 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].

6 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 )

7 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])

8 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, 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.

9 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])

10 Properties Alignment, Appearance, BackColor, ForeColor, UseMaskColor, Value, Visible, WhatsThisHelpID, SaveSetting appname, section, key, setting Caption, Container, DataChanged, DataField, hWnd GetAllSettings(appname, section) 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])


Related search queries