Example: quiz answers

Visual Basic Quick Reference - Cheat Sheet

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

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

Tags:

  Basics, Sheet, Visual, Teach, Cheat sheet, 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 Sheet

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

2 \ 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]. 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).

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

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

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

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

7 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 ) OLES erverBusyRaiseError, DataChanged, DataField, DataFormat, [statements] OLES erverBusyTimeout, Path, PrevInstance, DataMember, DragIcon, DragMode, Enabled, [Exit Property] ProductName, RetainedProject, Revision, Font, FontBold, FontItalic, FontStrikethru, [statements]

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

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

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


Related search queries