From 54e0a75f224118db0d26fc9363ad519ad35ec788 Mon Sep 17 00:00:00 2001 From: Kagre Date: Tue, 21 Aug 2018 18:58:49 -0600 Subject: [PATCH] Format Section headers (#48) * Fix VBA apersand issue * Update Syntax, Remarks, and Example sub section headers * Merge branch 'master' of https://github.com/MicrosoftDocs/VBA-Docs into MicrosoftDocs-master # Conflicts: # Language/Reference/User-Interface-Help/doloop-statement.md * Add a space between ## and section name --- Language/Concepts/Forms/passwordchar-property.md | 9 ++++++--- .../Getting-Started/deftype-statements.md | 10 +++++++--- .../Getting-Started/type-conversion-functions.md | 2 +- .../User-Interface-Help/accelerator-property.md | 9 ++++++--- .../activate-deactivate-events.md | 10 +++++++--- ...vecodepane-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/activecontrol-property.md | 9 ++++++--- ...evbproject-property-vba-add-in-object-model.md | 4 +++- ...tivewindow-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/add-method-dictionary.md | 9 ++++++--- .../add-method-microsoft-forms.md | 7 +++++-- .../add-method-vba-add-in-object-model.md | 9 ++++++--- .../add-method-visual-basic-for-applications.md | 9 ++++++--- .../User-Interface-Help/addcontrol-event.md | 7 +++++-- .../User-Interface-Help/addcustom-method.md | 6 ++++-- .../User-Interface-Help/addfolders-method.md | 9 ++++++--- .../addfromfile-method-vba-add-in-object-model.md | 9 ++++++--- .../addfromguid-method-vba-add-in-object-model.md | 9 ++++++--- ...ddfromstring-method-vba-add-in-object-model.md | 10 +++++++--- .../Reference/User-Interface-Help/addin-object.md | 10 +++++++--- .../addins-collection-vba-add-in-object-model.md | 10 +++++++--- .../User-Interface-Help/addins-property.md | 6 ++++-- .../User-Interface-Help/additem-method.md | 9 ++++++--- .../User-Interface-Help/addressof-operator.md | 10 +++++++--- .../User-Interface-Help/afterupdate-event.md | 9 ++++++--- .../User-Interface-Help/alignment-property.md | 9 ++++++--- .../Reference/User-Interface-Help/and-operator.md | 9 ++++++--- .../User-Interface-Help/appactivate-statement.md | 7 ++++--- .../User-Interface-Help/array-function.md | 10 +++++++--- .../Reference/User-Interface-Help/asc-function.md | 10 +++++++--- .../User-Interface-Help/assert-method.md | 11 +++++++---- .../User-Interface-Help/atendofline-property.md | 10 +++++++--- .../User-Interface-Help/atendofstream-property.md | 10 +++++++--- .../Reference/User-Interface-Help/atn-function.md | 10 +++++++--- .../User-Interface-Help/attributes-property.md | 9 ++++++--- .../User-Interface-Help/autosize-property.md | 9 ++++++--- .../User-Interface-Help/autotab-property.md | 9 ++++++--- .../autowordselect-property.md | 9 ++++++--- .../availablespace-property.md | 10 +++++++--- .../backcolor-property-microsoft-forms.md | 10 +++++++--- .../backstyle-property-microsoft-forms.md | 9 ++++++--- .../User-Interface-Help/beep-statement.md | 7 ++++--- .../User-Interface-Help/beforedragover-event.md | 7 +++++-- .../beforedroporpaste-event.md | 7 +++++-- .../User-Interface-Help/beforeupdate-event.md | 9 ++++++--- ...e-strikethrough-underline-weight-properties.md | 10 +++++++--- .../User-Interface-Help/bordercolor-property.md | 10 +++++++--- .../User-Interface-Help/borderstyle-property.md | 10 +++++++--- .../User-Interface-Help/boundcolumn-property.md | 9 ++++++--- .../User-Interface-Help/boundvalue-property.md | 11 +++++++---- .../User-Interface-Help/buildfilename-property.md | 6 ++++-- .../User-Interface-Help/buildpath-method.md | 9 ++++++--- .../User-Interface-Help/calendar-property.md | 3 ++- .../User-Interface-Help/call-statement.md | 2 +- .../User-Interface-Help/callbyname-function.md | 9 ++++++--- .../cancel-property-microsoft-forms.md | 9 ++++++--- .../User-Interface-Help/canpaste-property.md | 11 +++++++---- .../User-Interface-Help/canredo-property.md | 11 +++++++---- .../User-Interface-Help/canundo-property.md | 11 +++++++---- .../caption-propert-microsoft-forms.md | 10 +++++++--- .../caption-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/carrot-operator.md | 9 ++++++--- .../Reference/User-Interface-Help/change-event.md | 10 ++++++---- .../User-Interface-Help/chdrive-statement.md | 4 ++-- .../User-Interface-Help/checkbox-control.md | 4 +++- .../User-Interface-Help/choose-function.md | 11 +++++++---- .../Reference/User-Interface-Help/chr-function.md | 10 +++++++--- .../clear-method-microsoft-forms.md | 9 ++++++--- .../clear-method-visual-basic-for-applications.md | 10 +++++++--- .../click-event-vba-add-in-object-model.md | 9 ++++++--- .../Reference/User-Interface-Help/click-event.md | 7 ++++--- ...clientleft-clienttop-clientwidth-properties.md | 9 ++++++--- .../close-method-filesystemobject-object.md | 6 ++++-- .../close-method-vba-add-in-object-model.md | 10 +++++++--- .../User-Interface-Help/close-statement.md | 8 +++++--- .../codemodule-object-vba-add-in-object-model.md | 4 +++- ...codemodule-property-vba-add-in-object-model.md | 4 +++- .../codepane-object-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/codepane-property.md | 4 +++- ...odepanes-collection-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/collection-object.md | 4 +++- ...collection-property-vba-add-in-object-model.md | 4 +++- ...lumn-property-visual-basic-for-applications.md | 10 +++++++--- .../User-Interface-Help/column-property.md | 10 +++++++--- .../User-Interface-Help/columncount-property.md | 9 ++++++--- .../User-Interface-Help/columnheads-property.md | 10 +++++++--- .../User-Interface-Help/columnwidths-property.md | 9 ++++++--- .../User-Interface-Help/combobox-control.md | 4 +++- .../User-Interface-Help/command-function.md | 10 +++++++--- .../User-Interface-Help/commandbar-object.md | 6 ++++-- ...andbarevents-object-vba-add-in-object-model.md | 4 +++- ...dbarevents-property-vba-add-in-object-model.md | 3 ++- ...mandbars-collection-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/commandbutton-control.md | 4 +++- .../User-Interface-Help/comparemode-property.md | 9 ++++++--- .../User-Interface-Help/comparison-operators.md | 9 ++++++--- .../User-Interface-Help/connect-property.md | 4 +++- .../User-Interface-Help/const-directive.md | 3 ++- .../User-Interface-Help/const-statement.md | 5 +++-- .../controls-collection-microsoft-forms.md | 4 +++- .../User-Interface-Help/controlsource-property.md | 9 ++++++--- .../controltiptext-property.md | 9 ++++++--- .../copy-method-microsoft-forms.md | 9 ++++++--- .../copy-method-visual-basic-for-applications.md | 9 ++++++--- .../User-Interface-Help/copyfile-method.md | 9 ++++++--- .../User-Interface-Help/copyfolder-method.md | 9 ++++++--- .../Reference/User-Interface-Help/cos-function.md | 10 +++++++--- .../count-property-filesystemobject-object.md | 10 +++++++--- .../count-property-microsoft-forms.md | 9 ++++++--- ...ateeventproc-method-vba-add-in-object-model.md | 9 ++++++--- .../User-Interface-Help/createfolder-method.md | 9 ++++++--- .../User-Interface-Help/createobject-function.md | 9 ++++++--- .../User-Interface-Help/createtextfile-method.md | 9 ++++++--- .../createtoolwindow-method.md | 6 ++++-- .../User-Interface-Help/curdir-function.md | 6 ++++-- .../User-Interface-Help/curline-property.md | 9 ++++++--- .../User-Interface-Help/curtargetx-property.md | 10 +++++++--- .../User-Interface-Help/curx-property.md | 9 ++++++--- .../cut-method-microsoft-forms.md | 9 ++++++--- .../User-Interface-Help/cverr-function.md | 10 +++++++--- .../User-Interface-Help/cycle-property.md | 10 +++++++--- .../User-Interface-Help/dataobject-object.md | 4 +++- .../User-Interface-Help/date-function.md | 10 +++++++--- .../User-Interface-Help/date-statement.md | 4 ++-- .../User-Interface-Help/dateadd-function.md | 9 ++++++--- .../User-Interface-Help/datecreated-property.md | 10 +++++++--- .../User-Interface-Help/datediff-function.md | 9 ++++++--- .../datelastaccessed-property.md | 10 +++++++--- .../datelastmodified-property.md | 10 +++++++--- .../User-Interface-Help/datepart-function.md | 9 ++++++--- .../User-Interface-Help/dateserial-function.md | 9 ++++++--- .../User-Interface-Help/datevalue-function.md | 10 +++++++--- .../Reference/User-Interface-Help/day-function.md | 6 ++++-- .../User-Interface-Help/dblclick-event.md | 7 +++++-- .../Reference/User-Interface-Help/ddb-function.md | 9 ++++++--- .../User-Interface-Help/declare-statement.md | 3 ++- .../default-propertyd-microsoft-forms.md | 9 ++++++--- .../User-Interface-Help/delay-property.md | 9 ++++++--- ...delete-method-visual-basic-for-applications.md | 9 ++++++--- .../User-Interface-Help/deletefile-method.md | 9 ++++++--- .../User-Interface-Help/deletefolder-method.md | 9 ++++++--- .../deletelines-method-vba-add-in-object-model.md | 9 ++++++--- .../deletesetting-statement.md | 7 ++++--- ...escription-property-vba-add-in-object-model.md | 4 +++- ...tion-property-visual-basic-for-applications.md | 4 +++- .../designer-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/designerwindow-method.md | 10 +++++++--- .../User-Interface-Help/dictionary-object.md | 10 +++++++--- .../User-Interface-Help/dim-statement.md | 7 ++++--- .../Reference/User-Interface-Help/dir-function.md | 9 ++++++--- .../User-Interface-Help/doevents-function.md | 10 +++++++--- .../User-Interface-Help/doloop-statement.md | 15 ++++++++++++++- .../User-Interface-Help/dragbehavior-property.md | 9 ++++++--- .../User-Interface-Help/drawbuffer-property.md | 9 ++++++--- .../Reference/User-Interface-Help/drive-object.md | 4 +++- .../User-Interface-Help/drive-property.md | 10 +++++++--- .../User-Interface-Help/driveexists-method.md | 9 ++++++--- .../User-Interface-Help/driveletter-property.md | 10 +++++++--- .../User-Interface-Help/drives-collection.md | 4 +++- .../User-Interface-Help/drives-property.md | 10 +++++++--- .../User-Interface-Help/drivetype-property.md | 10 +++++++--- .../User-Interface-Help/dropbuttonclick-event.md | 9 ++++++--- .../dropbuttonstyle-property.md | 9 ++++++--- .../User-Interface-Help/dropdown-method.md | 9 ++++++--- .../enabled-property-microsoft-forms.md | 9 ++++++--- .../User-Interface-Help/end-statement.md | 7 ++++--- .../User-Interface-Help/enter-exit-events.md | 9 ++++++--- .../enterfieldbehavior-property.md | 9 ++++++--- .../enterkeybehavior-property.md | 9 ++++++--- .../User-Interface-Help/enum-statement.md | 5 +++-- .../User-Interface-Help/environ-function.md | 9 ++++++--- .../Reference/User-Interface-Help/eof-function.md | 10 +++++++--- .../User-Interface-Help/equals-operator.md | 9 ++++++--- .../Reference/User-Interface-Help/eqv-operator.md | 9 ++++++--- .../User-Interface-Help/erase-statement.md | 10 ++++++---- .../Reference/User-Interface-Help/error-event.md | 7 +++++-- .../User-Interface-Help/error-function.md | 10 +++++++--- .../User-Interface-Help/error-statement.md | 8 +++++--- .../User-Interface-Help/event-statement.md | 5 +++-- .../events-object-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/events-property.md | 6 ++++-- .../User-Interface-Help/exists-method.md | 6 ++++-- .../User-Interface-Help/exit-statement.md | 7 ++++--- .../Reference/User-Interface-Help/exp-function.md | 10 +++++++--- .../export-method-vba-add-in-object-model.md | 9 ++++++--- .../Reference/User-Interface-Help/file-object.md | 4 +++- .../User-Interface-Help/fileattr-function.md | 6 ++++-- .../User-Interface-Help/filecopy-statement.md | 7 ++++--- .../User-Interface-Help/filedatetime-function.md | 6 ++++-- .../User-Interface-Help/fileexists-method.md | 6 ++++-- .../User-Interface-Help/filelen-function.md | 10 +++++++--- .../User-Interface-Help/filename-property.md | 10 +++++++--- .../User-Interface-Help/files-collection.md | 4 +++- .../User-Interface-Help/files-property.md | 10 +++++++--- .../User-Interface-Help/filesystem-property.md | 10 +++++++--- .../filesystemobject-object.md | 10 +++++++--- .../User-Interface-Help/filter-function.md | 9 ++++++--- .../find-method-vba-add-in-object-model.md | 11 +++++++---- .../User-Interface-Help/folder-object.md | 4 +++- .../User-Interface-Help/folderexists-method.md | 6 ++++-- .../User-Interface-Help/folders-collection.md | 4 +++- .../font-object-microsoft-forms.md | 4 +++- .../User-Interface-Help/for-eachnext-statement.md | 7 ++++--- .../forecolor-property-microsoft-forms.md | 10 +++++++--- ...rmat-function-visual-basic-for-applications.md | 12 ++++++------ .../formatcurrency-function.md | 9 ++++++--- .../formatdatetime-function.md | 6 ++++-- .../User-Interface-Help/formatnumber-function.md | 9 ++++++--- .../User-Interface-Help/formatpercent-function.md | 9 ++++++--- .../User-Interface-Help/fornext-statement.md | 7 ++++--- .../User-Interface-Help/frame-control.md | 4 +++- .../User-Interface-Help/freefile-function.md | 10 +++++++--- .../User-Interface-Help/freespace-property.md | 10 +++++++--- .../User-Interface-Help/friend-keyword.md | 8 +++++--- .../User-Interface-Help/function-statement.md | 5 +++-- .../Reference/User-Interface-Help/fv-function.md | 9 ++++++--- .../User-Interface-Help/get-statement.md | 4 ++-- .../getabsolutepathname-method.md | 9 ++++++--- .../getallsettings-function.md | 11 +++++++---- .../User-Interface-Help/getattr-function.md | 9 ++++++--- .../User-Interface-Help/getbasename-method.md | 9 ++++++--- .../User-Interface-Help/getdrive-method.md | 9 ++++++--- .../User-Interface-Help/getdrivename-method.md | 9 ++++++--- .../getextensionname-method.md | 9 ++++++--- .../User-Interface-Help/getfile-method.md | 9 ++++++--- ...lename-method-visual-basic-for-applications.md | 9 ++++++--- .../User-Interface-Help/getfolder-method.md | 9 ++++++--- .../User-Interface-Help/getformat-method.md | 9 ++++++--- .../getfromclipboard-method.md | 9 ++++++--- .../User-Interface-Help/getobject-function.md | 9 ++++++--- .../getparentfoldername-method.md | 9 ++++++--- ...getselection-method-vba-add-in-object-model.md | 9 ++++++--- .../User-Interface-Help/getsetting-function.md | 9 ++++++--- .../getspecialfolder-method.md | 6 ++++-- .../User-Interface-Help/gettempname-method.md | 10 +++++++--- .../gettext-method-microsoft-forms.md | 9 ++++++--- .../User-Interface-Help/gosubreturn-statement.md | 8 +++++--- .../User-Interface-Help/goto-statement.md | 10 +++++----- .../User-Interface-Help/groupname-property.md | 9 ++++++--- .../height-property-vba-add-in-object-model.md | 4 +++- .../height-width-properties.md | 9 ++++++--- ...text-property-visual-basic-for-applications.md | 4 +++- .../User-Interface-Help/helpcontextid-property.md | 9 ++++++--- .../User-Interface-Help/helpfile-property.md | 4 +++- .../Reference/User-Interface-Help/hex-function.md | 10 +++++++--- .../Reference/User-Interface-Help/hide-method.md | 10 +++++++--- .../User-Interface-Help/hideselection-property.md | 9 ++++++--- .../User-Interface-Help/hour-function.md | 6 ++++-- .../User-Interface-Help/ifthenelse-directive.md | 7 ++++--- .../User-Interface-Help/ifthenelse-statement.md | 7 ++++--- .../Reference/User-Interface-Help/iif-function.md | 11 +++++++---- .../User-Interface-Help/image-control.md | 4 +++- .../User-Interface-Help/imemode-property.md | 10 +++++++--- .../User-Interface-Help/imestatus-function.md | 6 ++++-- .../Reference/User-Interface-Help/imp-operator.md | 9 ++++++--- .../User-Interface-Help/implements-statement.md | 7 ++++--- .../import-method-vba-add-in-object-model.md | 9 ++++++--- .../index-property-microsoft-forms.md | 9 ++++++--- ...dexedvalue-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/initialize-event.md | 10 +++++++--- .../User-Interface-Help/input-function.md | 9 ++++++--- .../User-Interface-Help/inputbox-function.md | 9 ++++++--- .../User-Interface-Help/inputstatement.md | 7 ++++--- .../insertlines-method-vba-add-in-object-model.md | 9 ++++++--- .../insideheight-insidewidth-properties.md | 9 ++++++--- .../User-Interface-Help/instr-function.md | 9 ++++++--- .../User-Interface-Help/instrrev-function.md | 9 ++++++--- .../User-Interface-Help/int-fix-functions.md | 10 +++++++--- .../integralheight-property.md | 9 ++++++--- .../User-Interface-Help/ipmt-function.md | 9 ++++++--- .../Reference/User-Interface-Help/irr-function.md | 9 ++++++--- .../Reference/User-Interface-Help/is-operator.md | 9 ++++++--- .../User-Interface-Help/isarray-function.md | 12 ++++++++---- .../User-Interface-Help/isdate-function.md | 10 +++++++--- .../User-Interface-Help/isempty-function.md | 12 ++++++++---- .../User-Interface-Help/iserror-function.md | 10 +++++++--- .../User-Interface-Help/ismissing-function.md | 10 +++++++--- .../User-Interface-Help/isnull-function.md | 12 ++++++++---- .../User-Interface-Help/isnumeric-function.md | 6 +++--- .../User-Interface-Help/isobject-function.md | 12 ++++++++---- .../User-Interface-Help/isready-property.md | 8 ++++++-- .../User-Interface-Help/isrootfolder-property.md | 10 +++++++--- .../item-method-microsoft-forms.md | 10 +++++++--- .../item-method-vba-add-in-object-model.md | 9 ++++++--- .../item-method-visual-basic-for-applications.md | 9 ++++++--- .../item-property-filesystemobject-object.md | 9 ++++++--- .../itemadded-event-vba-add-in-object-model.md | 10 +++++++--- .../itemremoved-event-vba-add-in-object-model.md | 6 ++++-- .../Reference/User-Interface-Help/items-method.md | 10 +++++++--- .../User-Interface-Help/join-function.md | 6 ++++-- .../keepscrollbarsvisible-property.md | 9 ++++++--- .../Reference/User-Interface-Help/key-property.md | 9 ++++++--- .../User-Interface-Help/keydown-keyup-events.md | 9 ++++++--- .../User-Interface-Help/keypress-event.md | 9 ++++++--- .../Reference/User-Interface-Help/keys-method.md | 10 +++++++--- .../User-Interface-Help/kill-statement.md | 8 +++++--- .../User-Interface-Help/label-control.md | 4 +++- .../User-Interface-Help/largechange-property.md | 9 ++++++--- .../User-Interface-Help/lastdllerror-property.md | 4 +++- .../Reference/User-Interface-Help/layout-event.md | 7 +++++-- .../User-Interface-Help/layouteffect-property.md | 9 ++++++--- .../User-Interface-Help/lbound-function.md | 9 ++++++--- .../User-Interface-Help/lcase-function.md | 10 +++++++--- .../User-Interface-Help/left-function.md | 9 ++++++--- .../left-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/left-top-properties.md | 10 +++++++--- .../Reference/User-Interface-Help/len-function.md | 9 ++++++--- .../User-Interface-Help/let-statement.md | 5 +++-- .../User-Interface-Help/like-operator.md | 4 ++-- .../User-Interface-Help/line-inputstatement.md | 7 ++++--- .../User-Interface-Help/line-property.md | 10 +++++++--- .../User-Interface-Help/linecount-property.md | 9 ++++++--- .../User-Interface-Help/lines-property.md | 9 ++++++--- ...indowframe-property-vba-add-in-object-model.md | 4 +++- ...dwindows-collection-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/linkedwindows-property.md | 4 +++- .../list-property-microsoft-forms.md | 10 +++++++--- .../User-Interface-Help/listbox-control.md | 4 +++- .../User-Interface-Help/listcount-property.md | 9 ++++++--- .../User-Interface-Help/listindex-property.md | 9 ++++++--- .../User-Interface-Help/listrows-property.md | 9 ++++++--- .../User-Interface-Help/liststyle-property.md | 9 ++++++--- .../User-Interface-Help/listwidth-property.md | 9 ++++++--- .../User-Interface-Help/load-statement.md | 8 +++++--- .../Reference/User-Interface-Help/loc-function.md | 10 +++++++--- .../User-Interface-Help/lock-unlock-statements.md | 7 ++++--- .../User-Interface-Help/locked-property.md | 9 ++++++--- .../Reference/User-Interface-Help/lof-function.md | 6 ++++-- .../Reference/User-Interface-Help/log-function.md | 10 +++++++--- .../User-Interface-Help/lset-statement.md | 9 +++++---- .../ltrim-rtrim-and-trim-functions.md | 6 ++++-- .../User-Interface-Help/macid-function.md | 12 ++++++++---- .../User-Interface-Help/macscript-function.md | 10 +++++++--- ...mainwindow-property-vba-add-in-object-model.md | 4 +++- .../major-property-vba-add-in-object-model.md | 4 +++- .../makecompiledfile-method.md | 6 ++++-- .../User-Interface-Help/matchentry-property.md | 9 ++++++--- .../User-Interface-Help/matchfound-property.md | 9 ++++++--- .../User-Interface-Help/matchrequired-property.md | 9 ++++++--- .../User-Interface-Help/max-min-properties.md | 9 ++++++--- .../User-Interface-Help/maxlength-property.md | 9 ++++++--- .../Reference/User-Interface-Help/mid-function.md | 9 ++++++--- .../User-Interface-Help/mid-statement.md | 7 ++++--- .../minor-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/minute-function.md | 6 ++++-- .../User-Interface-Help/mirr-function.md | 9 ++++++--- .../User-Interface-Help/mkdir-statement.md | 4 ++-- .../Reference/User-Interface-Help/mod-operator.md | 9 ++++++--- .../User-Interface-Help/month-function.md | 6 ++++-- .../User-Interface-Help/monthname-function.md | 6 ++++-- .../mousedown-mouseup-events.md | 7 +++++-- .../User-Interface-Help/mouseicon-property.md | 9 ++++++--- .../User-Interface-Help/mousemove-event.md | 7 +++++-- .../User-Interface-Help/mousepointer-property.md | 9 ++++++--- .../move-method-filesystemobject-object.md | 9 ++++++--- .../Reference/User-Interface-Help/move-method.md | 8 ++++++-- .../User-Interface-Help/movefile-method.md | 9 ++++++--- .../User-Interface-Help/movefolder-method.md | 9 ++++++--- .../User-Interface-Help/msgbox-function.md | 9 ++++++--- .../User-Interface-Help/multiline-property.md | 9 ++++++--- .../User-Interface-Help/multipage-control.md | 4 +++- .../User-Interface-Help/multirow-property.md | 9 ++++++--- .../multiselect-property-microsoft-forms.md | 9 ++++++--- .../name-property-filesystemobject-object.md | 9 ++++++--- .../name-property-vba-add-in-object-model.md | 4 +++- .../name-propertye-microsoft-forms.md | 8 ++++++-- .../User-Interface-Help/name-statement.md | 7 ++++--- .../User-Interface-Help/new-toolbar-dialog-box.md | 2 +- .../Reference/User-Interface-Help/not-operator.md | 9 ++++++--- .../Reference/User-Interface-Help/now-function.md | 6 ++++-- .../User-Interface-Help/nper-function.md | 9 ++++++--- .../Reference/User-Interface-Help/npv-function.md | 9 ++++++--- ...mber-property-visual-basic-for-applications.md | 4 +++- ...numindices-property-vba-add-in-object-model.md | 4 +++- .../object-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/object-property.md | 11 +++++++---- .../Reference/User-Interface-Help/oct-function.md | 10 +++++++--- .../oldheight-oldwidth-properties.md | 11 +++++++---- .../oldleft-oldtop-properties.md | 11 +++++++---- .../User-Interface-Help/on-error-statement.md | 7 ++++--- .../ongosub-ongoto-statements.md | 7 ++++--- .../User-Interface-Help/open-statement.md | 7 ++++--- .../openastextstream-method.md | 9 ++++++--- .../User-Interface-Help/opentextfile-method.md | 9 ++++++--- .../Reference/User-Interface-Help/operator.md | 9 ++++++--- .../User-Interface-Help/option-base-statement.md | 7 ++++--- .../option-compare-statement.md | 7 ++++--- .../option-explicit-statement.md | 7 ++++--- .../option-private-statement.md | 7 ++++--- .../User-Interface-Help/optionbutton-control.md | 4 +++- .../Reference/User-Interface-Help/or-operator.md | 9 ++++++--- .../orientation-property-microsoft-forms.md | 9 ++++++--- .../Reference/User-Interface-Help/page-object.md | 4 +++- .../pages-collection-microsoft-forms.md | 4 +++- .../parent-property-vba-add-in-object-model.md | 4 +++- .../parent-propertya-microsoft-forms.md | 11 +++++++---- .../User-Interface-Help/parentfolder-property.md | 10 +++++++--- .../User-Interface-Help/partition-function.md | 9 ++++++--- .../paste-method-microsoft-forms.md | 9 ++++++--- .../path-property-filesystemobject-object.md | 10 +++++++--- .../User-Interface-Help/picture-property.md | 9 ++++++--- .../picturealignment-property.md | 9 ++++++--- .../pictureposition-property.md | 9 ++++++--- .../picturesizemode-property.md | 9 ++++++--- .../User-Interface-Help/picturetiling-property.md | 9 ++++++--- .../User-Interface-Help/plus-operator.md | 9 ++++++--- .../Reference/User-Interface-Help/pmt-function.md | 9 ++++++--- .../User-Interface-Help/ppmt-function.md | 9 ++++++--- .../Reference/User-Interface-Help/print-method.md | 9 ++++++--- .../User-Interface-Help/printform-method.md | 12 ++++++++---- .../User-Interface-Help/printstatement.md | 7 ++++--- .../User-Interface-Help/private-statement.md | 9 +++++---- .../User-Interface-Help/procbodyline-property.md | 9 ++++++--- .../proccountlines-property.md | 9 ++++++--- .../User-Interface-Help/procofline-property.md | 9 ++++++--- .../User-Interface-Help/procstartline-property.md | 9 ++++++--- .../User-Interface-Help/progid-property.md | 6 ++++-- ...operties-collection-vba-add-in-object-model.md | 4 +++- ...properties-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/property-get-statement.md | 5 +++-- .../User-Interface-Help/property-let-statement.md | 5 +++-- .../property-object-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/property-set-statement.md | 5 +++-- .../proportionalthumb-property.md | 9 ++++++--- .../User-Interface-Help/public-statement.md | 7 ++++--- .../User-Interface-Help/put-statement.md | 7 ++++--- .../User-Interface-Help/putinclipboard-method.md | 9 ++++++--- .../Reference/User-Interface-Help/pv-function.md | 9 ++++++--- .../User-Interface-Help/qbcolor-function.md | 9 ++++++--- .../User-Interface-Help/queryclose-event.md | 10 +++++++--- .../Reference/User-Interface-Help/raise-method.md | 9 ++++++--- .../User-Interface-Help/raiseevent-statement.md | 7 ++++--- .../User-Interface-Help/randomize-statement.md | 10 ++++++---- .../User-Interface-Help/rate-function.md | 9 ++++++--- .../Reference/User-Interface-Help/read-method.md | 6 ++++-- .../User-Interface-Help/readall-method.md | 10 +++++++--- .../User-Interface-Help/readline-method.md | 6 ++++-- .../User-Interface-Help/redim-statement.md | 7 ++++--- .../User-Interface-Help/redoaction-method.md | 9 ++++++--- .../reference-object-vba-add-in-object-model.md | 4 +++- ...ferences-collection-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/references-property.md | 4 +++- ...rencesevents-object-vba-add-in-object-model.md | 4 +++- ...ncesevents-property-vba-add-in-object-model.md | 3 ++- .../User-Interface-Help/rem-statement.md | 8 +++++--- .../remove-method-filesystemobject-object.md | 9 ++++++--- .../remove-method-vba-add-in-object-model.md | 9 ++++++--- ...remove-method-visual-basic-for-applications.md | 9 ++++++--- .../User-Interface-Help/remove-method.md | 9 ++++++--- .../User-Interface-Help/removeall-method.md | 10 +++++++--- .../User-Interface-Help/removecontrol-event.md | 7 +++++-- .../User-Interface-Help/removeitem-method.md | 6 ++++-- .../rename-toolbar-dialog-box.md | 2 +- .../User-Interface-Help/repaint-method.md | 9 ++++++--- .../User-Interface-Help/replace-function.md | 9 ++++++--- .../replaceline-method-vba-add-in-object-model.md | 6 ++++-- .../User-Interface-Help/reset-statement.md | 7 ++++--- .../Reference/User-Interface-Help/resize-event.md | 10 +++++++--- .../User-Interface-Help/resume-statement.md | 7 ++++--- .../Reference/User-Interface-Help/rgb-function.md | 9 ++++++--- .../User-Interface-Help/right-function.md | 9 ++++++--- .../righttoleft-property-microsoft-forms.md | 12 ++++++++---- .../User-Interface-Help/righttoleft-property.md | 4 +++- .../User-Interface-Help/rmdir-statement.md | 8 +++++--- .../Reference/User-Interface-Help/rnd-function.md | 9 ++++++--- .../User-Interface-Help/rootfolder-property.md | 10 +++++++--- .../User-Interface-Help/round-function.md | 6 ++++-- .../User-Interface-Help/rowsource-property.md | 9 ++++++--- .../User-Interface-Help/rset-statement.md | 7 ++++--- .../saveas-method-vba-add-in-object-model.md | 9 ++++++--- .../saved-property-vba-add-in-object-model.md | 3 ++- .../User-Interface-Help/savesetting-statement.md | 7 ++++--- .../Reference/User-Interface-Help/scroll-event.md | 7 +++++-- .../User-Interface-Help/scroll-method.md | 9 ++++++--- .../User-Interface-Help/scrollbar-control.md | 4 +++- .../User-Interface-Help/scrollbars-property.md | 9 ++++++--- .../scrollheight-scrollwidth-properties.md | 6 ++++-- .../scrollleft-scrolltop-properties.md | 9 ++++++--- .../User-Interface-Help/second-function.md | 6 ++++-- .../User-Interface-Help/seek-function.md | 12 ++++++++---- .../User-Interface-Help/seek-statement.md | 7 ++++--- .../User-Interface-Help/select-case-statement.md | 7 ++++--- .../User-Interface-Help/selected-property.md | 9 ++++++--- .../User-Interface-Help/selecteditem-property.md | 9 ++++++--- ...bcomponent-property-vba-add-in-object-model.md | 4 +++- .../selectionmargin-property.md | 9 ++++++--- .../User-Interface-Help/sellength-property.md | 9 ++++++--- .../User-Interface-Help/selstart-property.md | 9 ++++++--- .../User-Interface-Help/seltext-property.md | 9 ++++++--- .../User-Interface-Help/sendkeys-statement.md | 7 ++++--- .../User-Interface-Help/serialnumber-property.md | 10 +++++++--- .../User-Interface-Help/set-statement.md | 7 ++++--- .../User-Interface-Help/setattr-statement.md | 7 ++++--- .../setdefaulttaborder-method.md | 9 ++++++--- .../setfocus-method-vba-add-in-object-model.md | 10 +++++++--- .../User-Interface-Help/setfocus-method.md | 9 ++++++--- ...setselection-method-vba-add-in-object-model.md | 6 ++++-- .../User-Interface-Help/settext-method.md | 9 ++++++--- .../Reference/User-Interface-Help/sgn-function.md | 9 ++++++--- .../User-Interface-Help/sharename-property.md | 10 +++++++--- .../User-Interface-Help/shell-function.md | 9 ++++++--- .../User-Interface-Help/shortname-property.md | 10 +++++++--- .../User-Interface-Help/shortpath-property.md | 10 +++++++--- .../show-method-vba-add-in-object-model.md | 10 +++++++--- .../Reference/User-Interface-Help/show-method.md | 7 +++++-- .../showdropbuttonwhen-property.md | 6 ++++-- .../User-Interface-Help/showmodal-property.md | 8 ++++++-- .../Reference/User-Interface-Help/sin-function.md | 10 +++++++--- .../size-property-filesystemobject-object.md | 10 +++++++--- .../Reference/User-Interface-Help/skip-method.md | 9 ++++++--- .../User-Interface-Help/skipline-method.md | 10 +++++++--- .../Reference/User-Interface-Help/sln-function.md | 9 ++++++--- .../User-Interface-Help/smallchange-property.md | 9 ++++++--- ...urce-property-visual-basic-for-applications.md | 4 +++- .../User-Interface-Help/space-function.md | 10 +++++++--- .../Reference/User-Interface-Help/spc-function.md | 10 +++++++--- .../User-Interface-Help/specialeffect-property.md | 8 ++++++-- .../User-Interface-Help/spinbutton-control.md | 4 +++- .../User-Interface-Help/spindown-spinup-events.md | 9 ++++++--- .../User-Interface-Help/split-function.md | 6 ++++-- .../Reference/User-Interface-Help/sqr-function.md | 6 ++++-- .../User-Interface-Help/startdrag-method.md | 9 ++++++--- .../startupposition-property.md | 3 ++- .../User-Interface-Help/static-statement.md | 7 ++++--- .../User-Interface-Help/stop-statement.md | 7 ++++--- .../Reference/User-Interface-Help/str-function.md | 10 +++++++--- .../User-Interface-Help/strcomp-function.md | 6 ++++-- .../User-Interface-Help/strconv-function.md | 10 +++++++--- .../User-Interface-Help/string-function.md | 9 ++++++--- .../User-Interface-Help/strreverse-function.md | 6 ++++-- .../User-Interface-Help/style-property.md | 4 +++- .../User-Interface-Help/sub-statement.md | 4 ++-- .../User-Interface-Help/subfolders-property.md | 10 +++++++--- .../User-Interface-Help/switch-function.md | 9 ++++++--- .../Reference/User-Interface-Help/syd-function.md | 9 ++++++--- .../Reference/User-Interface-Help/tab-function.md | 10 +++++++--- .../Reference/User-Interface-Help/tab-object.md | 4 +++- .../tabfixedheight-tabfixedwidth-properties.md | 10 +++++++--- .../User-Interface-Help/tabindex-property.md | 9 ++++++--- .../tabkeybehavior-property.md | 9 ++++++--- .../taborientation-property.md | 9 ++++++--- .../tabs-collection-microsoft-forms.md | 4 +++- .../tabstop-property-vbe-dev.md | 6 ++++-- .../User-Interface-Help/tabstrip-control.md | 4 +++- .../Reference/User-Interface-Help/tag-property.md | 9 ++++++--- .../takefocusonclick-property.md | 9 ++++++--- .../Reference/User-Interface-Help/tan-function.md | 12 ++++++++---- ...rminate-event-visual-basic-for-applications.md | 10 +++++++--- .../text-property-microsoft-forms.md | 9 ++++++--- .../User-Interface-Help/textalign-property.md | 9 ++++++--- .../User-Interface-Help/textbox-control.md | 4 +++- .../User-Interface-Help/textcolumn-property.md | 10 +++++++--- .../User-Interface-Help/textlength-property.md | 9 ++++++--- .../User-Interface-Help/textstream-object.md | 10 +++++++--- .../User-Interface-Help/time-function.md | 10 +++++++--- .../User-Interface-Help/time-statement.md | 8 +++++--- .../User-Interface-Help/timer-function.md | 10 +++++++--- .../User-Interface-Help/timeserial-function.md | 9 ++++++--- .../User-Interface-Help/timevalue-function.md | 10 +++++++--- .../User-Interface-Help/togglebutton-control.md | 4 +++- .../top-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/topindex-property.md | 6 ++++-- .../topline-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/totalsize-property.md | 10 +++++++--- .../transitioneffect-property.md | 9 ++++++--- .../transitionperiod-property.md | 9 ++++++--- .../User-Interface-Help/triplestate-property.md | 9 ++++++--- .../type-property-filesystemobject-object.md | 10 +++++++--- .../User-Interface-Help/type-statement.md | 4 ++-- .../User-Interface-Help/ubound-function.md | 9 ++++++--- .../User-Interface-Help/ucase-function.md | 10 +++++++--- .../User-Interface-Help/undoaction-method.md | 9 ++++++--- .../User-Interface-Help/unload-statement.md | 8 +++++--- .../update-method-vba-add-in-object-model.md | 10 +++++++--- .../User-Interface-Help/userform-object.md | 10 +++++++--- .../Reference/User-Interface-Help/val-function.md | 10 +++++++--- .../value-property-microsoft-forms.md | 9 ++++++--- .../value-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/vartype-function.md | 9 ++++++--- .../vbcomponent-object-vba-add-in-object-model.md | 4 +++- ...mponents-collection-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/vbcomponents-property.md | 4 +++- .../vbe-object-vba-add-in-object-model.md | 4 +++- .../vbe-property-vba-add-in-object-model.md | 4 +++- ...projects-collection-vba-add-in-object-model.md | 2 +- .../vbproject-object-vba-add-in-object-model.md | 4 +++- ...projects-collection-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/vbprojects-property.md | 6 ++++-- .../version-property-vba-add-in-object-model.md | 4 +++- .../verticalscrollbarside-property.md | 9 ++++++--- .../visible-property-microsoft-forms.md | 9 ++++++--- .../User-Interface-Help/volumename-property.md | 9 ++++++--- .../User-Interface-Help/weekday-function.md | 9 ++++++--- .../User-Interface-Help/weekdayname-function.md | 6 ++++-- .../whatsthisbutton-property.md | 8 ++++++-- .../User-Interface-Help/whatsthishelp-property.md | 8 ++++++-- .../User-Interface-Help/whatsthismode-method.md | 10 +++++++--- .../User-Interface-Help/whilewend-statement.md | 7 ++++--- .../width-property-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/widthstatement.md | 4 ++-- .../window-object-vba-add-in-object-model.md | 4 +++- .../windows-collection-vba-add-in-object-model.md | 4 +++- .../User-Interface-Help/windows-property.md | 6 ++++-- .../User-Interface-Help/with-statement.md | 7 ++++--- .../User-Interface-Help/wordwrap-property.md | 9 ++++++--- .../Reference/User-Interface-Help/write-method.md | 9 ++++++--- .../User-Interface-Help/writeblanklines-method.md | 6 ++++-- .../User-Interface-Help/writeline-method.md | 6 ++++-- .../User-Interface-Help/writestatement.md | 7 ++++--- .../Reference/User-Interface-Help/xor-operator.md | 7 +++++-- .../User-Interface-Help/year-function.md | 6 ++++-- .../Reference/User-Interface-Help/zoom-event.md | 7 +++++-- .../User-Interface-Help/zoom-property.md | 9 ++++++--- .../User-Interface-Help/zorder-method.md | 9 ++++++--- Office-Mac/GrantAccessToMultipleFiles.md | 4 ++-- .../Miscellaneous/required-client-settings.md | 4 +++- ...nderstanding-objects-properties-and-methods.md | 2 +- 617 files changed, 3253 insertions(+), 1592 deletions(-) diff --git a/Language/Concepts/Forms/passwordchar-property.md b/Language/Concepts/Forms/passwordchar-property.md index 9acecee9ab5..286369e3363 100644 --- a/Language/Concepts/Forms/passwordchar-property.md +++ b/Language/Concepts/Forms/passwordchar-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether [placeholder](../../Glossary/glossary-vba.md) characters are displayed instead of the characters actually entered in a **TextBox**. - **Syntax** - _object_. **PasswordChar** [= _String_ ] + +## Syntax + +_object_. **PasswordChar** [= _String_ ] The **PasswordChar** property syntax has these parts: @@ -26,6 +28,7 @@ The **PasswordChar** property syntax has these parts: | _object_|Required. A valid object.| | _String_|Optional. A string expression specifying the placeholder character.| - **Remarks** +## Remarks + You can use the **PasswordChar** property to protect sensitive information, such as passwords or security codes. The value of **PasswordChar** is the character that appears in a control instead of the actual characters that the user types. If you don't specify a character, the control displays the characters that the user types. diff --git a/Language/Concepts/Getting-Started/deftype-statements.md b/Language/Concepts/Getting-Started/deftype-statements.md index a6fad2579b4..1469bd47f0e 100644 --- a/Language/Concepts/Getting-Started/deftype-statements.md +++ b/Language/Concepts/Getting-Started/deftype-statements.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used at [module level](../../Glossary/vbe-glossary.md) to set the default[data type](../../Glossary/vbe-glossary.md) for[variables](../../Glossary/vbe-glossary.md), [arguments](../../Glossary/vbe-glossary.md) passed to[procedures](../../Glossary/vbe-glossary.md), and the return type for **Function** and **Property** **Get** procedures whose names start with the specified characters. - **Syntax** - **DefBool**_letterrange_ [ **,**_letterrange_ ] **. . .** + +## Syntax + +**DefBool**_letterrange_ [ **,**_letterrange_ ] **. . .** **DefByte**_letterrange_ [ **,**_letterrange_ ] **. . .** **DefInt**_letterrange_ [ **,**_letterrange_ ] **. . .** **DefLng**_letterrange_ [ **,**_letterrange_ ] **. . .** @@ -32,7 +34,9 @@ Used at [module level](../../Glossary/vbe-glossary.md) to set the default[data t The required _letterrange_ argument has the following syntax: _letter1_ [ **-**_letter2_ ] The _letter1_ and _letter2_ arguments specify the name range for which you can set a default data type. Each argument represents the first letter of the variable, argument, **Function** procedure, or **Property Get** procedure name and can be any letter of the alphabet. The case of letters in _letterrange_ isn't significant. - **Remarks** + +## Remarks + The statement name determines the data type: diff --git a/Language/Concepts/Getting-Started/type-conversion-functions.md b/Language/Concepts/Getting-Started/type-conversion-functions.md index 9ea9d16a816..7fd594a62e7 100644 --- a/Language/Concepts/Getting-Started/type-conversion-functions.md +++ b/Language/Concepts/Getting-Started/type-conversion-functions.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Each function coerces an [expression](../../Glossary/vbe-glossary.md) to a specific [data type](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **CBool(**_expression_**)** - **CByte(**_expression_**)** diff --git a/Language/Reference/User-Interface-Help/accelerator-property.md b/Language/Reference/User-Interface-Help/accelerator-property.md index cb5ed1d82c3..03a5cf3dca3 100644 --- a/Language/Reference/User-Interface-Help/accelerator-property.md +++ b/Language/Reference/User-Interface-Help/accelerator-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Sets or retrieves the [accelerator key](../../../language/Glossary/glossary-vba.md) for a control. - **Syntax** - _object_. **Accelerator** [= _String_ ] + +## Syntax + +_object_. **Accelerator** [= _String_ ] The **Accelerator** property syntax has these parts: @@ -26,7 +28,8 @@ The **Accelerator** property syntax has these parts: | _object_|Required. A valid object.| | _String_|Optional. The character to use as the accelerator key.| - **Remarks** +## Remarks + To designate an accelerator key, enter a single character for the **Accelerator** property. You can set **Accelerator** in the control's property sheet or in code. If the value of this property contains more than one character, the first character in the string becomes the value of **Accelerator**. When an accelerator key is used, there is no visual feedback (other than [focus](../../Glossary/vbe-glossary.md)) to indicate that the control initiated the Click event. For example, if the accelerator key applies to a **CommandButton**, the user will not see the button pressed in the interface. The button receives the focus, however, when the user presses the accelerator key. If the accelerator applies to a **Label**, the control following the **Label** in the[tab order](../../Glossary/vbe-glossary.md), rather than the **Label** itself, receives the focus. diff --git a/Language/Reference/User-Interface-Help/activate-deactivate-events.md b/Language/Reference/User-Interface-Help/activate-deactivate-events.md index 8b6e0d5b27f..6adb6738611 100644 --- a/Language/Reference/User-Interface-Help/activate-deactivate-events.md +++ b/Language/Reference/User-Interface-Help/activate-deactivate-events.md @@ -14,11 +14,15 @@ ms.date: 06/08/2017 The Activate event occurs when an object becomes the active window. The Deactivate event occurs when an object is no longer the active window. - **Syntax** - **Private Sub**_object_**_Activate()** + +## Syntax + +**Private Sub**_object_**_Activate()** **Private Sub**_object_**_Deactivate()** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + An object can become active by using the **Show** method in code. The Activate event can occur only when an object is visible. A **UserForm** loaded with **Load** isn't visible unless you use the **Show** method. The Activate and Deactivate events occur only when you move the [focus](../../Glossary/vbe-glossary.md) within an application. Moving the focus to or from an object in another application doesn't trigger either event. diff --git a/Language/Reference/User-Interface-Help/activecodepane-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/activecodepane-property-vba-add-in-object-model.md index 1bea25ce19d..3004b592880 100644 --- a/Language/Reference/User-Interface-Help/activecodepane-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/activecodepane-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns the active or last active **CodePane** object or sets the active **CodePane** object. Read/write. - **Remarks** + +## Remarks + You can set the **ActiveCodePane** property to any valid **CodePane** object, as shown in the following example: diff --git a/Language/Reference/User-Interface-Help/activecontrol-property.md b/Language/Reference/User-Interface-Help/activecontrol-property.md index cb54284d791..121b5ee2689 100644 --- a/Language/Reference/User-Interface-Help/activecontrol-property.md +++ b/Language/Reference/User-Interface-Help/activecontrol-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Identifies and allows manipulation of the control that has the [focus](../../Glossary/vbe-glossary.md). - **Syntax** - _object_. **ActiveControl** + +## Syntax + +_object_. **ActiveControl** The **ActiveControl** property syntax has these parts: @@ -25,6 +27,7 @@ The **ActiveControl** property syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The **ActiveControl** property is read-only and is set when you select a control in the interface. You can use **ActiveControl** as a substitute for the control name when setting properties or calling methods. diff --git a/Language/Reference/User-Interface-Help/activevbproject-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/activevbproject-property-vba-add-in-object-model.md index 6fc19d5a469..a2677174918 100644 --- a/Language/Reference/User-Interface-Help/activevbproject-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/activevbproject-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns the active [project](../../Glossary/vbe-glossary.md) in the[Project window](../../Glossary/vbe-glossary.md). Read-only. - **Remarks** + +## Remarks + The **ActiveVBProject** property returns the project that is selected in the **Project** window or the project in which the components are selected. In the latter case, the project itself isn't necessarily selected. Whether or not the project is explicitly selected, there is always an active project. diff --git a/Language/Reference/User-Interface-Help/activewindow-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/activewindow-property-vba-add-in-object-model.md index 09943e565c7..85b7315866d 100644 --- a/Language/Reference/User-Interface-Help/activewindow-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/activewindow-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns the active window in the [development environment](../../Glossary/vbe-glossary.md). Read-only. - **Remarks** + +## Remarks + When more than one window is open in the development environment, the **ActiveWindow** property setting is the window with the[focus](../../Glossary/vbe-glossary.md). If the main window has the focus, **ActiveWindow** returns **Nothing**. diff --git a/Language/Reference/User-Interface-Help/add-method-dictionary.md b/Language/Reference/User-Interface-Help/add-method-dictionary.md index 0c7241437db..2f705c09366 100644 --- a/Language/Reference/User-Interface-Help/add-method-dictionary.md +++ b/Language/Reference/User-Interface-Help/add-method-dictionary.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Adds a key and item pair to a **Dictionary** object. - **Syntax** - _object_. **Add**_key_, _item_ + +## Syntax + +_object_. **Add**_key_, _item_ The **Add** method has the following parts: @@ -26,6 +28,7 @@ The **Add** method has the following parts: | _key_|Required. The key associated with the item being added.| | _item_|Required. The item associated with the key being added.| - **Remarks** +## Remarks + An error occurs if the _key_ already exists. diff --git a/Language/Reference/User-Interface-Help/add-method-microsoft-forms.md b/Language/Reference/User-Interface-Help/add-method-microsoft-forms.md index cd27fd4e640..3473fbc4501 100644 --- a/Language/Reference/User-Interface-Help/add-method-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/add-method-microsoft-forms.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Adds or inserts a **Tab** or **Page** in a **TabStrip** or **MultiPage**, or adds a control by its programmatic identifier ( _ProgID_ ) to a page or form. - **Syntax** + +## Syntax + For MultiPage, TabStrip **Set**_Object_ = _object_. **Add(** [ _Name_ [, _Caption_ [, _index_ ]]] **)** For other controls **Set**_Control_ = _object_. **Add(**_ProgID_ [, _Name_ [, _Visible_ ]] **)** The **Add** method syntax has these parts: @@ -49,7 +51,8 @@ The **Add** method syntax has these parts: |**TextBox**|Forms.TextBox.1| |**ToggleButton**|Forms.ToggleButton.1| - **Remarks** +## Remarks + For a **MultiPage** control, the **Add** method returns a **Page** object. For a **TabStrip**, it returns a **Tab** object. The index value for the first **Page** or **Tab** of a[collection](../../Glossary/vbe-glossary.md) is 0, the value for the second **Page** or **Tab** is 1, and so on. For the **Controls** collection of an object, the **Add** method returns a control corresponding to the specified _ProgID_. The AddControl event occurs after the control is added. You can add a control to a user form's **Controls** collection at design time, but you must use the **Designer** property of the Microsoft Visual Basic for Applications Extensibility Library to do so. The **Designer** property returns the **UserForm** object. diff --git a/Language/Reference/User-Interface-Help/add-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/add-method-vba-add-in-object-model.md index 6f020cf0acb..62f7dcdcb7a 100644 --- a/Language/Reference/User-Interface-Help/add-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/add-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Adds an object to a [collection](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.Add(**_component_**)** + +## Syntax + +_object_**.Add(**_component_**)** The **Add** syntax has these parts: @@ -34,7 +36,8 @@ You can use one of the following constants for the _component_ argument: |**vbext_ct_StdModule**|Adds a standard module to the collection.| |**vbext_pt_StandAlone**|Adds a standalone project to the collection.| - **Remarks** +## Remarks + For the **LinkedWindows** collection, the **Add** method adds a window to the collection of currently[linked windows](../../Glossary/vbe-glossary.md). **Note** You can add a window that is a pane in one [linked window frame](../../Glossary/vbe-glossary.md) to another linked window frame; the window is simply moved from one pane to the other. If the linked window frame that the window was moved from no longer contains any panes, it's destroyed. diff --git a/Language/Reference/User-Interface-Help/add-method-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/add-method-visual-basic-for-applications.md index 88e969f743f..710f6440ea9 100644 --- a/Language/Reference/User-Interface-Help/add-method-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/add-method-visual-basic-for-applications.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Adds a [member](../../Glossary/vbe-glossary.md) to a **Collection** object. - **Syntax** - _object_**.Add _item_,** **_key_,** **_before_,** **_after_** + +## Syntax + +_object_**.Add _item_,** **_key_,** **_before_,** **_after_** The **Add** method syntax has the following object qualifier and[named arguments](../../Glossary/vbe-glossary.md): @@ -27,7 +29,8 @@ The **Add** method syntax has the following object qualifier and[named argument |**_before_**|Optional. An expression that specifies a relative position in the collection. The member to be added is placed in the collection before the member identified by the **_before_**[argument](../../Glossary/vbe-glossary.md). If a [numeric expression](../../Glossary/vbe-glossary.md), **_before_** must be a number from 1 to the value of the collection's **Count** property. If a string expression, **_before_** must correspond to the **_key_** specified when the member being referred to was added to the collection. You can specify a **_before_** position or an **_after_** position, but not both.| |**_after_**|Optional. An expression that specifies a relative position in the collection. The member to be added is placed in the collection after the member identified by the **_after_** argument. If numeric, **_after_** must be a number from 1 to the value of the collection's **Count** property. If a string, **_after_** must correspond to the **_key_** specified when the member referred to was added to the collection. You can specify a **_before_** position or an **_after_** position, but not both.| - **Remarks** +## Remarks + Whether the **_before_** or **_after_** argument is a string expression or numeric expression, it must refer to an existing member of the collection, or an error occurs. An error also occurs if a specified **_key_** duplicates the **_key_** for an existing member of the collection. diff --git a/Language/Reference/User-Interface-Help/addcontrol-event.md b/Language/Reference/User-Interface-Help/addcontrol-event.md index 5e5bc09686a..1d9be327c73 100644 --- a/Language/Reference/User-Interface-Help/addcontrol-event.md +++ b/Language/Reference/User-Interface-Help/addcontrol-event.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Occurs when a control is inserted onto a form, a **Frame**, or a **Page** of a **MultiPage**. - **Syntax** + +## Syntax + For Frame **Private Sub**_object_ _**AddControl( )** For MultiPage **Private Sub**_object_ _**AddControl(**_index_**As Long**, _ctrl_**As Control)** The **AddControl** event syntax has these parts: @@ -28,7 +30,8 @@ The **AddControl** event syntax has these parts: | _index_|Required. The index of the **Page** that will contain the new control.| | _ctrl_|Required. The control to be added.| - **Remarks** +## Remarks + The AddControl event occurs when a control is added at [run time](../../Glossary/vbe-glossary.md). This event is not initiated when you add a control at [design time](../../Glossary/vbe-glossary.md), nor is it initiated when a form is initially loaded and displayed at run time. The default action of this event is to add a control to the specified form, **Frame**, or **MultiPage**. The **Add** method initiates the AddControl event. diff --git a/Language/Reference/User-Interface-Help/addcustom-method.md b/Language/Reference/User-Interface-Help/addcustom-method.md index 2635c857336..50ac149e63b 100644 --- a/Language/Reference/User-Interface-Help/addcustom-method.md +++ b/Language/Reference/User-Interface-Help/addcustom-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns a **VBComponent** object, or creates a new custom component and adds it to the project. - **Syntax** - _object_**.AddCustom** (**ByVal**_progid_**As String**) **As VBComponent** + +## Syntax + +_object_**.AddCustom** (**ByVal**_progid_**As String**) **As VBComponent** The **AddCustom** method syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/addfolders-method.md b/Language/Reference/User-Interface-Help/addfolders-method.md index ab2ff460420..6c897c1310d 100644 --- a/Language/Reference/User-Interface-Help/addfolders-method.md +++ b/Language/Reference/User-Interface-Help/addfolders-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Adds a new **Folder** to a **Folders** collection. - **Syntax** - _object_. **Add**_folderName_ + +## Syntax + +_object_. **Add**_folderName_ The **Add** method has the following parts: @@ -27,6 +29,7 @@ The **Add** method has the following parts: | _object_|Required. Always the name of a **Folders** collection.| | _folderName_|Required. The name of the new **Folder** being added.| - **Remarks** +## Remarks + An error occurs if the _folderName_ already exists. diff --git a/Language/Reference/User-Interface-Help/addfromfile-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/addfromfile-method-vba-add-in-object-model.md index 79e946c353d..03799faa65e 100644 --- a/Language/Reference/User-Interface-Help/addfromfile-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/addfromfile-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 For the **References** collection, adds a reference to a[project](../../Glossary/vbe-glossary.md) from a file. For the **CodeModule** object, adds the contents of a file to a[module](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.AddFromFile(**_filename_**)** + +## Syntax + +_object_**.AddFromFile(**_filename_**)** The **AddFromFile** syntax has these parts: @@ -24,6 +26,7 @@ The **AddFromFile** syntax has these parts: | _object_|Required. An [object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list.| | _filename_|Required. A [string expression](../../Glossary/vbe-glossary.md) specifying the name of the file you want to add to the project or module. If the file name isn't found and a path name isn't specified, the directories searched by the **Windows OpenFile** function are searched.| - **Remarks** +## Remarks + For the **CodeModule** object, the **AddFromFile** method inserts the contents of the file starting on the line preceding the first[procedure](../../Glossary/vbe-glossary.md) in the[code module](../../Glossary/vbe-glossary.md). If the module doesn't contain procedures, **AddFromFile** places the contents of the file at the end of the module. diff --git a/Language/Reference/User-Interface-Help/addfromguid-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/addfromguid-method-vba-add-in-object-model.md index a0b57ded6b1..e3ed7981c14 100644 --- a/Language/Reference/User-Interface-Help/addfromguid-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/addfromguid-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Adds a reference to the **References** collection using the globally unique identifier (GUID) of the reference. - **Syntax** - _object_**.AddFromGuid(**_guid_, _major_, _minor_**)** **As Reference** + +## Syntax + +_object_**.AddFromGuid(**_guid_, _major_, _minor_**)** **As Reference** The **AddFromGuid** syntax has these parts: @@ -26,6 +28,7 @@ The **AddFromGuid** syntax has these parts: | _major_|Required. A [Long](../../Glossary/vbe-glossary.md) specifying the major version number of the reference.| | _minor_|Required. A **Long** specifying the minor version number of the reference.| - **Remarks** +## Remarks + The **AddFromGuid** method searches the[registry](../../Glossary/vbe-glossary.md) to find the reference you want to add. The GUID can be a[type library](../../Glossary/vbe-glossary.md), [control](../../Glossary/vbe-glossary.md), class identifier, and so on. diff --git a/Language/Reference/User-Interface-Help/addfromstring-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/addfromstring-method-vba-add-in-object-model.md index 05d9f97a0ce..8298062715a 100644 --- a/Language/Reference/User-Interface-Help/addfromstring-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/addfromstring-method-vba-add-in-object-model.md @@ -14,9 +14,13 @@ ms.date: 06/08/2017 Adds text to a [module](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.AddFromString** + +## Syntax + +_object_**.AddFromString** The _object_ placeholder is an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + The **AddFromString** method inserts the text starting on the line preceding the first[procedure](../../Glossary/vbe-glossary.md) in the module. If the module doesn't contain procedures, **AddFromString** places the text at the end of the module. diff --git a/Language/Reference/User-Interface-Help/addin-object.md b/Language/Reference/User-Interface-Help/addin-object.md index 27f8e1c3d52..c401b436b8a 100644 --- a/Language/Reference/User-Interface-Help/addin-object.md +++ b/Language/Reference/User-Interface-Help/addin-object.md @@ -16,8 +16,12 @@ ms.date: 06/08/2017 The **AddIn** object provides information about an add-in to other add-ins. - **Syntax** - _object_**.AddIn** - **Remarks** + +## Syntax + +_object_**.AddIn** + +## Remarks + An **AddIn** object is created for every add-in that appears in the Add-In Manger. diff --git a/Language/Reference/User-Interface-Help/addins-collection-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/addins-collection-vba-add-in-object-model.md index b21320b631b..21f3a20d9bb 100644 --- a/Language/Reference/User-Interface-Help/addins-collection-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/addins-collection-vba-add-in-object-model.md @@ -16,8 +16,12 @@ ms.date: 06/08/2017 Returns a collection of add-ins registered for VBA. - **Syntax** - _object_**.AddIns** - **Remarks** + +## Syntax + +_object_**.AddIns** + +## Remarks + The **AddIns** collection is accessed through the **VBE** object. Every add-in listed in the Add-In Manager in VBE.has an object in the **AddIns** collection. diff --git a/Language/Reference/User-Interface-Help/addins-property.md b/Language/Reference/User-Interface-Help/addins-property.md index a810c1d3b3e..5b2cffedc6c 100644 --- a/Language/Reference/User-Interface-Help/addins-property.md +++ b/Language/Reference/User-Interface-Help/addins-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Returns a collection which add-ins can use to register their automation components into the extensibility object model. - **Syntax** - _object_. **AddIns** + +## Syntax + +_object_. **AddIns** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. diff --git a/Language/Reference/User-Interface-Help/additem-method.md b/Language/Reference/User-Interface-Help/additem-method.md index df9d42a1546..aada749a456 100644 --- a/Language/Reference/User-Interface-Help/additem-method.md +++ b/Language/Reference/User-Interface-Help/additem-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 For a single-column list box or combo box, adds an item to the list. For a multicolumn list box or combo box, adds a row to the list. - **Syntax** - _Variant_ = _object_. **AddItem** [ _item_ [, _varIndex_ ]] + +## Syntax + +_Variant_ = _object_. **AddItem** [ _item_ [, _varIndex_ ]] The **AddItem** method syntax has these parts: @@ -27,7 +29,8 @@ The **AddItem** method syntax has these parts: | _Item_|Optional. Specifies the item or row to add. The number of the first item or row is 0; the number of the second item or row is 1, and so on.| | _varIndex_|Optional. Integer specifying the position within the object where the new item or row is placed.| - **Remarks** +## Remarks + If you supply a valid value for _varIndex_, the **AddItem** method places the item or row at that position within the list. If you omit _varIndex_, the method adds the item or row at the end of the list. The value of _varIndex_ must not be greater than the value of the **ListCount** property. For a multicolumn **ListBox** or **ComboBox**, **AddItem** inserts an entire row, that is, it inserts an item for each column of the control. To assign values to an item beyond the first column, use the **List** or **Column** property and specify the row and column of the item. diff --git a/Language/Reference/User-Interface-Help/addressof-operator.md b/Language/Reference/User-Interface-Help/addressof-operator.md index d50c24062eb..e2beab4e269 100644 --- a/Language/Reference/User-Interface-Help/addressof-operator.md +++ b/Language/Reference/User-Interface-Help/addressof-operator.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 A unary operator that causes the address of the [procedure](../../Glossary/vbe-glossary.md) it precedes to be passed to an API procedure that expects a function pointer at that position in the[argument](../../Glossary/vbe-glossary.md) list. - **Syntax** - **AddressOf**_procedurename_ + +## Syntax + +**AddressOf**_procedurename_ The required _procedurename_ specifies the procedure whose address is to be passed. It must represent a procedure in a[standard module](../../Glossary/vbe-glossary.md) module in the[project](../../Glossary/vbe-glossary.md) in which the call is made. - **Remarks** + +## Remarks + When a procedure name appears in an argument list, usually the procedure is evaluated, and the address of the procedure's return value is passed. **AddressOf** permits the address of the procedure to be passed to a Windows API function in a[dynamic-link library (DLL)](../../Glossary/vbe-glossary.md), rather passing the procedure's return value. The API function can then use the address to call the Basic procedure, a process known as a callback. The **AddressOf** operator appears only in the call to the API procedure. Although you can use **AddressOf** to pass procedure pointers among Basic procedures, you can't call a function through such a pointer from within Basic. This means, for example, that a[class](../../Glossary/vbe-glossary.md) written in Basic can't make a callback to its controller using such a pointer. When using **AddressOf** to pass a procedure pointer among procedures within Basic, the[parameter](../../Glossary/vbe-glossary.md) of the called procedure must be typed **As Long**. Using **AddressOf** may cause unpredictable results if you don't completely understand the concept of function callbacks. You must understand how the Basic portion of the callback works, and also the code of the DLL into which you are passing your function address. Debugging such interactions is difficult since the program runs in the same process as the[development environment](../../Glossary/vbe-glossary.md). In some cases, systematic debugging may not be possible. diff --git a/Language/Reference/User-Interface-Help/afterupdate-event.md b/Language/Reference/User-Interface-Help/afterupdate-event.md index dbc3cceea05..939bd08334d 100644 --- a/Language/Reference/User-Interface-Help/afterupdate-event.md +++ b/Language/Reference/User-Interface-Help/afterupdate-event.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Occurs after data in a control is changed through the user interface. - **Syntax** - **Private Sub**_object_ _**AfterUpdate( )** + +## Syntax + +**Private Sub**_object_ _**AfterUpdate( )** The **AfterUpdate** event syntax has these parts: @@ -25,7 +27,8 @@ The **AfterUpdate** event syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The AfterUpdate event occurs regardless of whether the control is [bound](../../../language/Glossary/glossary-vba.md) (that is, when the **RowSource** property specifies a[data source](../../../language/Glossary/glossary-vba.md) for the control). This event cannot be canceled. If you want to cancel the update (to restore the previous value of the control), use the BeforeUpdate event and set the _Cancel_ argument to **True**. The AfterUpdate event occurs after the BeforeUpdate event and before the Exit event for the current control and before the Enter event for the next control in the [tab order](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/alignment-property.md b/Language/Reference/User-Interface-Help/alignment-property.md index 933790c3a25..0a526530c79 100644 --- a/Language/Reference/User-Interface-Help/alignment-property.md +++ b/Language/Reference/User-Interface-Help/alignment-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the position of a control relative to its caption. - **Syntax** - _object_. **Alignment** [= _fmAlignment_ ] + +## Syntax + +_object_. **Alignment** [= _fmAlignment_ ] The **Alignment** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _fmAlignment_ are: | _fmAlignmentLeft_|0|Places the caption to the left of the control.| | _fmAlignmentRight_|1|Places the caption to the right of the control (default).| - **Remarks** +## Remarks + The caption text for a control is left-aligned. **Note** Although the **Alignment** property exists on the **ToggleButton**, the property is disabled. You cannot set or return a value for this property on the **ToggleButton**. diff --git a/Language/Reference/User-Interface-Help/and-operator.md b/Language/Reference/User-Interface-Help/and-operator.md index 5f925a60959..51d36bbba59 100644 --- a/Language/Reference/User-Interface-Help/and-operator.md +++ b/Language/Reference/User-Interface-Help/and-operator.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to perform a logical conjunction on two [expressions](../../Glossary/vbe-glossary.md). - **Syntax** - _result_**=**_expression1_ **And** _expression2_ + +## Syntax + +_result_**=**_expression1_ **And** _expression2_ The **And** operator syntax has these parts: @@ -25,7 +27,8 @@ The **And** operator syntax has these parts: | _expression1_|Required; any expression.| | _expression2_|Required; any expression.| - **Remarks** +## Remarks + If both expressions evaluate to **True**, _result_ is **True**. If either expression evaluates to **False**, _result_ is **False.** The following table illustrates how _result_ is determined: diff --git a/Language/Reference/User-Interface-Help/appactivate-statement.md b/Language/Reference/User-Interface-Help/appactivate-statement.md index 89a94e11ff8..7195b5cdbd4 100644 --- a/Language/Reference/User-Interface-Help/appactivate-statement.md +++ b/Language/Reference/User-Interface-Help/appactivate-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Activates an application window. - **Syntax** +## Syntax - **AppActivate** **_title_** [, **_wait_** ] +**AppActivate** **_title_** [, **_wait_** ] The **AppActivate** statement syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,7 +25,8 @@ The **AppActivate** statement syntax has these[named arguments](../../Glossary/ |**_title_**|Required. [String expression](../../Glossary/vbe-glossary.md) specifying the title in the title bar of the application window you want to activate. The task ID returned by the **Shell** function can be used in place of **_title_** to activate an application.| |**_wait_**|Optional. [Boolean](../../Glossary/vbe-glossary.md) value specifying whether the calling application has the focus before activating another. If **False** (default), the specified application is immediately activated, even if the calling application does not have the focus. If **True**, the calling application waits until it has the focus, then activates the specified application.| - **Remarks** +## Remarks + The **AppActivate** statement changes the focus to the named application or window but does not affect whether it is maximized or minimized. Focus moves from the activated application window when the user takes some action to change the focus or close the window. Use the **Shell** function to start an application and set the window style. In determining which application to activate, **_title_** is compared to the title string of each running application. If there is no exact match, any application whose title string begins with **_title_** is activated. If there is more than one instance of the application named by **_title_**, one instance is arbitrarily activated. diff --git a/Language/Reference/User-Interface-Help/array-function.md b/Language/Reference/User-Interface-Help/array-function.md index 44a738e70e4..781cd34d924 100644 --- a/Language/Reference/User-Interface-Help/array-function.md +++ b/Language/Reference/User-Interface-Help/array-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a [Variant](../../Glossary/vbe-glossary.md) containing an[array](../../Glossary/vbe-glossary.md). - **Syntax** - **Array(**_arglist_**)** + +## Syntax + +**Array(**_arglist_**)** The required _arglist_[argument](../../Glossary/vbe-glossary.md) is a comma-delimited list of values that are assigned to the elements of the array contained within the **Variant**. If no arguments are specified, an array of zero length is created. - **Remarks** + +## Remarks + The notation used to refer to an element of an array consists of the [variable](../../Glossary/vbe-glossary.md) name followed by parentheses containing an index number indicating the desired element. In the following example, the first[statement](../../Glossary/vbe-glossary.md) creates a variable named `A` as a **Variant**. The second statement assigns an array to variable `A`. The last statement assigns the value contained in the second array element to another variable. diff --git a/Language/Reference/User-Interface-Help/asc-function.md b/Language/Reference/User-Interface-Help/asc-function.md index 82d96941207..d760c02e10d 100644 --- a/Language/Reference/User-Interface-Help/asc-function.md +++ b/Language/Reference/User-Interface-Help/asc-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns an [Integer](../../Glossary/vbe-glossary.md) representing the[character code](../../Glossary/vbe-glossary.md) corresponding to the first letter in a string. - **Syntax** - **Asc(**_string_**)** + +## Syntax + +**Asc(**_string_**)** The required _string_[argument](../../Glossary/vbe-glossary.md) is any valid[string expression](../../Glossary/vbe-glossary.md). If the _string_ contains no characters, a[run-time error](../../Glossary/vbe-glossary.md) occurs. - **Remarks** + +## Remarks + The range for returns is 0 - 255 on non-DBCS systems, but -32768 - 32767 on [DBCS](../../Glossary/vbe-glossary.md) systems. **Note** The **AscB** function is used with byte data contained in a string. Instead of returning the character code for the first character, **AscB** returns the first byte. The **AscW** function returns the[Unicode](../../Glossary/vbe-glossary.md) character code except on platforms where Unicode is not supported, in which case, the behavior is identical to the **Asc** function. diff --git a/Language/Reference/User-Interface-Help/assert-method.md b/Language/Reference/User-Interface-Help/assert-method.md index 048ea761710..5c4fd69a020 100644 --- a/Language/Reference/User-Interface-Help/assert-method.md +++ b/Language/Reference/User-Interface-Help/assert-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Conditionally suspends execution at the line on which the method appears. - **Syntax** - _object_**.Assert**_booleanexpression_ + +## Syntax + +_object_**.Assert**_booleanexpression_ The **Assert** method syntax has the following object qualifier and argument: @@ -26,8 +28,9 @@ The **Assert** method syntax has the following object qualifier and argument: | _object_|Required. Always the **Debug** object.| | _booleanexpression_|Required. An [expression](../../Glossary/vbe-glossary.md) that evaluates to either **True** or **False**.| - **Remarks** - **Assert** invocations work only within the[development environment](../../Glossary/vbe-glossary.md). When the [module](../../Glossary/vbe-glossary.md) is compiled into an executable, the method calls on the **Debug** object are omitted. +## Remarks + +**Assert** invocations work only within the[development environment](../../Glossary/vbe-glossary.md). When the [module](../../Glossary/vbe-glossary.md) is compiled into an executable, the method calls on the **Debug** object are omitted. All of _booleanexpression_ is always evaluated. For example, even if the first part of an **And** expression evaluates **False**, the entire expression is evaluated. ## Example diff --git a/Language/Reference/User-Interface-Help/atendofline-property.md b/Language/Reference/User-Interface-Help/atendofline-property.md index c052adbcd88..6e4a5162e8b 100644 --- a/Language/Reference/User-Interface-Help/atendofline-property.md +++ b/Language/Reference/User-Interface-Help/atendofline-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Read-only property that returns **True** if the file pointer immediately precedes the end-of-line marker in a **TextStream** file; **False** if it does not. - **Syntax** - _object_. **AtEndOfLine** + +## Syntax + +_object_. **AtEndOfLine** The _object_ is always the name of a **TextStream** object. - **Remarks** + +## Remarks + The **AtEndOfLine** property applies only to **TextStream** files that are open for reading; otherwise, an error occurs. The following code illustrates the use of the **AtEndOfLine** property: diff --git a/Language/Reference/User-Interface-Help/atendofstream-property.md b/Language/Reference/User-Interface-Help/atendofstream-property.md index 95969ec2135..3adadea412d 100644 --- a/Language/Reference/User-Interface-Help/atendofstream-property.md +++ b/Language/Reference/User-Interface-Help/atendofstream-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Read-only property that returns **True** if the file pointer is at the end of a **TextStream** file; **False** if it is not. - **Syntax** - _object_. **AtEndOfStream** + +## Syntax + +_object_. **AtEndOfStream** The _object_ is always the name of a **TextStream** object. - **Remarks** + +## Remarks + The **AtEndOfStream** property applies only to **TextStream** files that are open for reading; otherwise, an error occurs. The following code illustrates the use of the **AtEndOfStream** property: diff --git a/Language/Reference/User-Interface-Help/atn-function.md b/Language/Reference/User-Interface-Help/atn-function.md index 241a3a833e2..1c62065b326 100644 --- a/Language/Reference/User-Interface-Help/atn-function.md +++ b/Language/Reference/User-Interface-Help/atn-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Double** specifying the arctangent of a number. - **Syntax** - **Atn(**_number_**)** + +## Syntax + +**Atn(**_number_**)** The required _number_[argument](../../Glossary/vbe-glossary.md) is a[Double](../../Glossary/vbe-glossary.md) or any valid[numeric expression](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + The **Atn** function takes the ratio of two sides of a right triangle ( _number_ ) and returns the corresponding angle in radians. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle. The range of the result is **-**[pi](../../Glossary/vbe-glossary.md)/2 to pi/2 radians. To convert degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi. diff --git a/Language/Reference/User-Interface-Help/attributes-property.md b/Language/Reference/User-Interface-Help/attributes-property.md index 903ea414442..c5a6f509233 100644 --- a/Language/Reference/User-Interface-Help/attributes-property.md +++ b/Language/Reference/User-Interface-Help/attributes-property.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Sets or returns the attributes of files or folders. Read/write or read-only, depending on the attribute. - **Syntax** - _object_. **Attributes** [= _newattributes_ ] + +## Syntax + +_object_. **Attributes** [= _newattributes_ ] The **Attributes** property has these parts: @@ -43,7 +45,8 @@ The _newattributes_ argument can have any of the following values or any logica |**Alias**|64|Link or shortcut. Attribute is read-only.| |**Compressed**|128|Compressed file. Attribute is read-only.| - **Remarks** +## Remarks + The following code illustrates the use of the **Attributes** property with a file: diff --git a/Language/Reference/User-Interface-Help/autosize-property.md b/Language/Reference/User-Interface-Help/autosize-property.md index e9d85d5ce5c..5b0b844892a 100644 --- a/Language/Reference/User-Interface-Help/autosize-property.md +++ b/Language/Reference/User-Interface-Help/autosize-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether an object automatically resizes to display its entire contents. - **Syntax** - _object_. **AutoSize** [= _Boolean_ ] + +## Syntax + +_object_. **AutoSize** [= _Boolean_ ] The **AutoSize** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|Automatically resizes the control to display its entire contents.| |**False**|Keeps the size of the control constant. Contents are clipped when they exceed the area of the control (default).| - **Remarks** +## Remarks + For controls with captions, the **AutoSize** property specifies whether the control automatically adjusts to display the entire caption. For controls without captions, this property specifies whether the control automatically adjusts to display the information stored in the control. In a **ComboBox**, for example, setting **AutoSize** to **True** automatically sets the width of the display area to match the length of the current text. For a single-line text box, setting **AutoSize** to **True** automatically sets the width of the display area to the length of the text in the text box. diff --git a/Language/Reference/User-Interface-Help/autotab-property.md b/Language/Reference/User-Interface-Help/autotab-property.md index 0124f4839cf..f76c9405f08 100644 --- a/Language/Reference/User-Interface-Help/autotab-property.md +++ b/Language/Reference/User-Interface-Help/autotab-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether an automatic tab occurs when a user enters the maximum allowable number of characters into a **TextBox** or the text box portion of a **ComboBox**. - **Syntax** - _object_. **AutoTab** [= _Boolean_ ] + +## Syntax + +_object_. **AutoTab** [= _Boolean_ ] The **AutoTab** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|Tab occurs.| |**False**|Tab does not occur (default).| - **Remarks** +## Remarks + The **MaxLength** property specifies the maximum number of characters allowed in a **TextBox** or the text box portion of a **ComboBox**. You can specify the **AutoTab** property for a **TextBox** or **ComboBox** on a form for which you usually enter a set number of characters. Once a user enters the maximum number of characters, the[focus](../../Glossary/vbe-glossary.md) automatically moves to the next control in the[tab order](../../Glossary/vbe-glossary.md). For example, if a **TextBox** displays inventory stock numbers that are always five characters long, you can use **MaxLength** to specify the maximum number of characters to enter into the **TextBox** and **AutoTab** to automatically tab to the next control after the user enters five characters. Support for **AutoTab** varies from one application to another. Not all[containers](../../Glossary/vbe-glossary.md) support this property. diff --git a/Language/Reference/User-Interface-Help/autowordselect-property.md b/Language/Reference/User-Interface-Help/autowordselect-property.md index 18fb6efd577..6f51a8c5176 100644 --- a/Language/Reference/User-Interface-Help/autowordselect-property.md +++ b/Language/Reference/User-Interface-Help/autowordselect-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether a word or a character is the basic unit used to extend a selection. - **Syntax** - _object_. **AutoWordSelect** [= _Boolean_ ] + +## Syntax + +_object_. **AutoWordSelect** [= _Boolean_ ] The **AutoWordSelect** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|Uses a word as the basic unit (default).| |**False**|Uses a character as the basic unit.| - **Remarks** +## Remarks + The **AutoWordSelect** property specifies how the selection extends or contracts in the edit region of a **TextBox** or **ComboBox**. If the user places the insertion point in the middle of a word and then extends the selection while **AutoWordSelect** is **True**, the selection includes the entire word. diff --git a/Language/Reference/User-Interface-Help/availablespace-property.md b/Language/Reference/User-Interface-Help/availablespace-property.md index c6f9a259946..775f47cada8 100644 --- a/Language/Reference/User-Interface-Help/availablespace-property.md +++ b/Language/Reference/User-Interface-Help/availablespace-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the amount of space available to a user on the specified drive or network share. - **Syntax** - _object_. **AvailableSpace** + +## Syntax + +_object_. **AvailableSpace** The _object_ is always a **Drive** object. - **Remarks** + +## Remarks + The value returned by the **AvailableSpace** property is typically the same as that returned by the **FreeSpace** property. Differences may occur between the two values for computer systems that support quotas. The following code illustrates the use of the **AvailableSpace** property: diff --git a/Language/Reference/User-Interface-Help/backcolor-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/backcolor-property-microsoft-forms.md index a859e6a15de..8061750a1e8 100644 --- a/Language/Reference/User-Interface-Help/backcolor-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/backcolor-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Specifies the [background color](../../../language/Glossary/glossary-vba.md) of the object. - **Syntax** - _object_. **BackColor** [= _Long_ ] + +## Syntax + +_object_. **BackColor** [= _Long_ ] The **BackColor** property syntax has these parts: @@ -26,6 +28,8 @@ The **BackColor** property syntax has these parts: **Settings** You can use any integer that represents a valid color. You can also specify a color by using the [RGB](../../../language/Glossary/glossary-vba.md) function with red, green, and blue color components. The value of each color component is an integer that ranges from zero to 255. For example, you can specify teal blue as the integer value 4966415 or as red, green, and blue color components 15, 200, 75. - **Remarks** + +## Remarks + You can only see the background color of an object if the **BackStyle** property is set to **fmBackStyleOpaque**. diff --git a/Language/Reference/User-Interface-Help/backstyle-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/backstyle-property-microsoft-forms.md index 9daecb5b764..564d65f4e61 100644 --- a/Language/Reference/User-Interface-Help/backstyle-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/backstyle-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns or sets the background style for an object. - **Syntax** - _object_. **BackStyle** [= _fmBackStyle_ ] + +## Syntax + +_object_. **BackStyle** [= _fmBackStyle_ ] The **BackStyle** property syntax has these parts: @@ -33,7 +35,8 @@ The settings for _fmBackStyle_ are: | _fmBackStyleTransparent_|0|The background is transparent.| | _fmBackStyleOpaque_|1|The background is opaque (default).| - **Remarks** +## Remarks + The **BackStyle** property determines whether a control is[transparent](../../../language/Glossary/glossary-vba.md). If **BackStyle** is **fmBackStyleOpaque**, the control is not transparent and you cannot see anything behind the control on a form. If **BackStyle** is **fmBackStyleTransparent**, you can see through the control and look at anything on the form located behind the control. **Note** **BackStyle** does not affect the transparency of bitmaps. You must use a picture editor such as Paintbrush to make a bitmap transparent. Not all controls support transparent bitmaps. diff --git a/Language/Reference/User-Interface-Help/beep-statement.md b/Language/Reference/User-Interface-Help/beep-statement.md index 50562885a91..5b38a1a736b 100644 --- a/Language/Reference/User-Interface-Help/beep-statement.md +++ b/Language/Reference/User-Interface-Help/beep-statement.md @@ -13,11 +13,12 @@ ms.date: 06/08/2017 Sounds a tone through the computer's speaker. - **Syntax** +## Syntax - **Beep** +**Beep** + +## Remarks - **Remarks** The frequency and duration of the beep depend on your hardware and system software, and vary among computers. ## Example diff --git a/Language/Reference/User-Interface-Help/beforedragover-event.md b/Language/Reference/User-Interface-Help/beforedragover-event.md index 00ca22b6f97..6df414ecf99 100644 --- a/Language/Reference/User-Interface-Help/beforedragover-event.md +++ b/Language/Reference/User-Interface-Help/beforedragover-event.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Occurs when a drag-and-drop operation is in progress. - **Syntax** + +## Syntax + For Frame **Private Sub**_object_ _**BeforeDragOver( ByVal**_Cancel_**As MSForms.ReturnBoolean**, _ctrl_**As Control**, **ByVal**_Data_**As DataObject**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single**, **ByVal**_DragState_**As fmDragState**, **ByVal**_Effect_**As MSForms.ReturnEffect**, **ByVal**_Shift_**As fmShiftState)** For MultiPage **Private Sub**_object_ _**BeforeDragOver(**_index_**As Long**, **ByVal**_Cancel_**As MSForms.ReturnBoolean**, _ctrl_**As Control**, **ByVal**_Data_**As DataObject**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single**, **ByVal**_DragState_**As fmDragState**, **ByVal**_Effect_**As MSForms.ReturnEffect**, **ByVal**_Shift_**As fmShiftState)** For TabStrip **Private Sub**_object_ _**BeforeDragOver(**_index_**As Long**, **ByVal**_Cancel_**As MSForms.ReturnBoolean**, **ByVal**_Data_**As DataObject**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single**, **ByVal**_DragState_**As fmDragState**, **ByVal**_Effect_**As MSForms.ReturnEffect**, **ByVal**_Shift_**As fmShiftState)** @@ -65,7 +67,8 @@ The settings for _Shift_ are: | _fmCtrlMask_|2|CTRL was pressed.| | _fmAltMask_|4|ALT was pressed.| - **Remarks** +## Remarks + Use this event to monitor the mouse pointer as it enters, leaves, or rests directly over a valid [target](../../../language/Glossary/glossary-vba.md). When a drag-and-drop operation is in progress, the system initiates this event when the user moves the mouse, or presses or releases the mouse button or buttons. The mouse pointer position determines the target object that receives this event. You can determine the state of the mouse pointer by examining the _DragState_ argument. When a control handles this event, you can use the _Effect_ argument to identify the drag-and-drop action to perform. When _Effect_ is set to **fmDropEffectCopyOrMove**, the drop source supports a copy (**fmDropEffectCopy**), move (**fmDropEffectMove**), or a cancel (**fmDropEffectNone**) operation. When _Effect_ is set to **fmDropEffectCopy**, the drop source supports a copy or a cancel (**fmDropEffectNone**) operation. diff --git a/Language/Reference/User-Interface-Help/beforedroporpaste-event.md b/Language/Reference/User-Interface-Help/beforedroporpaste-event.md index 7f7e12f07b0..e66508d203c 100644 --- a/Language/Reference/User-Interface-Help/beforedroporpaste-event.md +++ b/Language/Reference/User-Interface-Help/beforedroporpaste-event.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Occurs when the user is about to drop or paste data onto an object. - **Syntax** + +## Syntax + For Frame **Private Sub**_object_ _**BeforeDropOrPaste( ByVal**_Cancel_**As MSForms.ReturnBoolean**, _ctrl_**As Control**, **ByVal**_Action_**As fmAction**, **ByVal**_Data_**As DataObject**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single**, **ByVal**_Effect_**As MSForms.ReturnEffect**, **ByVal**_Shift_**As fmShiftState)** For MultiPage **Private Sub**_object_ _**BeforeDropOrPaste(**_index_**As Long**, **ByVal**_Cancel_**As MSForms.ReturnBoolean**, _ctrl_**As Control**, **ByVal**_Action_**As fmAction**, **ByVal**_Data_**As DataObject**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single**, **ByVal**_Effect_**As MSForms.ReturnEffect**, **ByVal**_Shift_**As fmShiftState)** For TabStrip **Private Sub**_object_ _**BeforeDropOrPaste(**_index_**As Long**, **ByVal**_Cancel_**As MSForms.ReturnBoolean**, **ByVal**_Action_**As fmAction**, **ByVal**_Data_**As DataObject**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single**, **ByVal**_Effect_**As MSForms.ReturnEffect**, **ByVal**_Shift_**As fmShiftState)** @@ -64,7 +66,8 @@ The settings for _Shift_ are: | _fmCtrlMask_|2|CTRL was pressed.| | _fmAltMask_|4|ALT was pressed.| - **Remarks** +## Remarks + For a **MultiPage** or **TabStrip**, Visual Basic for Applications initiates this event when it transfers a data object to the control. For other controls, the system initiates this event immediately prior to the drop or paste operation. When a control handles this event, you can update the _Action_ argument to identify the drag-and-drop action to perform. When _Effect_ is set to **fmDropEffectCopyOrMove**, you can assign _Action_ to **fmDropEffectNone**, **fmDropEffectCopy**, or **fmDropEffectMove**. When _Effect_ is set to **fmDropEffectCopy** or **fmDropEffectMove**, you can reassign _Action_ to **fmDropEffectNone**. You cannot reassign _Action_ when _Effect_ is set to **fmDropEffectNone**. diff --git a/Language/Reference/User-Interface-Help/beforeupdate-event.md b/Language/Reference/User-Interface-Help/beforeupdate-event.md index 39d353d36c7..ea32144709c 100644 --- a/Language/Reference/User-Interface-Help/beforeupdate-event.md +++ b/Language/Reference/User-Interface-Help/beforeupdate-event.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Occurs before data in a control is changed. - **Syntax** - **Private Sub**_object_ _**BeforeUpdate( ByVal**_Cancel_**As MSForms.ReturnBoolean)** + +## Syntax + +**Private Sub**_object_ _**BeforeUpdate( ByVal**_Cancel_**As MSForms.ReturnBoolean)** The **BeforeUpdate** event syntax has these parts: @@ -26,7 +28,8 @@ The **BeforeUpdate** event syntax has these parts: | _object_|Required. A valid object.| | _Cancel_|Required. Event status. **False** indicates that the control should handle the event (default). **True** cancels the update and indicates the application should handle the event.| - **Remarks** +## Remarks + The BeforeUpdate event occurs regardless of whether the control is [bound](../../../language/Glossary/glossary-vba.md) (that is, when the **RowSource** property specifies a[data source](../../../language/Glossary/glossary-vba.md) for the control). This event occurs before the AfterUpdate and Exit events for the control (and before the Enter event for the next control that receives[focus](../../Glossary/vbe-glossary.md)). If you set the _Cancel_ argument to **True**, the focus remains on the control and neither the AfterUpdate event nor the Exit event occurs. diff --git a/Language/Reference/User-Interface-Help/bold-italic-size-strikethrough-underline-weight-properties.md b/Language/Reference/User-Interface-Help/bold-italic-size-strikethrough-underline-weight-properties.md index bf328311f13..3cacaf524a9 100644 --- a/Language/Reference/User-Interface-Help/bold-italic-size-strikethrough-underline-weight-properties.md +++ b/Language/Reference/User-Interface-Help/bold-italic-size-strikethrough-underline-weight-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Specifies the visual attributes of text on a displayed or printed form. - **Syntax** - _object_. **Bold** [= _Boolean_ ] + +## Syntax + +_object_. **Bold** [= _Boolean_ ] _object_. **Italic** [= _Boolean_ ] _object_. **Size** [= _Currency_ ] _object_. **StrikeThrough** [= _Boolean_ ] @@ -40,7 +42,9 @@ The settings for _Boolean_ are: |**False**|The text does not have the specified attribute (default).| The **Weight** property accepts values from 0 to 1000. A value of zero allows the system to pick the most appropriate weight. A value from 1 to 1000 indicates a specific weight, where 1 represents the lightest type and 1000 represents the darkest type. - **Remarks** + +## Remarks + These properties define the visual characteristics of text. The **Bold** property determines whether text is normal or bold. The **Italic** property determines whether text is normal or italic. The **Size** property determines the height, in[points](../../Glossary/vbe-glossary.md), of displayed text. The **Underline** property determines whether text is underlined. The **StrikeThrough** property determines whether the text appears with strikethrough marks. The **Weight** property determines the darkness of the type. The font's appearance on screen and in print may differ, depending on your computer and printer. If you select a font that your system can't display with the specified attribute or that isn't installed, the operating system substitutes a similar font. The substitute font will be as similar as possible to the font originally requested. Changing the value of **Bold** also changes the value of **Weight**. Setting **Bold** to **True** sets **Weight** to 700; setting **Bold** to **False** sets **Weight** to 400. Conversely, setting **Weight** to anything over 550 sets **Bold** to **True**; setting **Weight** to 550 or less sets **Bold** to **False**. diff --git a/Language/Reference/User-Interface-Help/bordercolor-property.md b/Language/Reference/User-Interface-Help/bordercolor-property.md index 8dfaa09e4c4..1e3ae2bad72 100644 --- a/Language/Reference/User-Interface-Help/bordercolor-property.md +++ b/Language/Reference/User-Interface-Help/bordercolor-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the color of an object's border. - **Syntax** - _object_. **BorderColor** [= _Long_ ] + +## Syntax + +_object_. **BorderColor** [= _Long_ ] The **BorderColor** property syntax has these parts: @@ -28,7 +30,9 @@ The **BorderColor** property syntax has these parts: **Settings** You can use any integer that represents a valid color. You can also specify a color by using the [RGB](../../../language/Glossary/glossary-vba.md) function with red, green, and blue color components. The value of each color component is an integer that ranges from zero to 255. For example, you can specify teal blue as the integer value 4966415 or as RGB color component values 15, 200, 75. - **Remarks** + +## Remarks + To use the **BorderColor** property, the **BorderStyle** property must be set to a value other than **fmBorderStyleNone**. **BorderStyle** uses **BorderColor** to define the border colors. The **SpecialEffect** property uses[system colors](../../../language/Glossary/glossary-vba.md) exclusively to define its border colors. For Windows operating systems, system color settings are part of the **Control Panel** and are found in the **Appearance** tab of the **Display** folder. In Windows NT 4.0 or later, system color settings are stored in the **Color** folder of the **Control Panel**. diff --git a/Language/Reference/User-Interface-Help/borderstyle-property.md b/Language/Reference/User-Interface-Help/borderstyle-property.md index 03fa9a7c544..d7108b5ded9 100644 --- a/Language/Reference/User-Interface-Help/borderstyle-property.md +++ b/Language/Reference/User-Interface-Help/borderstyle-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the type of border used by a control or a form. - **Syntax** - _object_. **BorderStyle** [= _fmBorderStyle_ ] + +## Syntax + +_object_. **BorderStyle** [= _fmBorderStyle_ ] The **BorderStyle** property syntax has these parts: @@ -36,7 +38,9 @@ The settings for _fmBorderStyle_ are: | _fmBorderStyleSingle_|1|The control has a single-line border (default).| The default value for a **ComboBox**, **Frame**, **Label**, **ListBox** or **TextBox** is 0 ( _None_ ). The default value for an **Image** is 1 ( _Single_ ). - **Remarks** + +## Remarks + For a **Frame**, the **BorderStyle** property is ignored if the **SpecialEffect** property is _None_. You can use either **BorderStyle** or **SpecialEffect** to specify the border for a control, but not both. If you specify a nonzero value for one of these properties, the system sets the value of the other property to zero. For example, if you set **BorderStyle** to **fmBorderStyleSingle**, the system sets **SpecialEffect** to zero ( _Flat_ ). If you specify a nonzero value for **SpecialEffect**, the system sets **BorderStyle** to zero. **BorderStyle** uses **BorderColor** to define the colors of its borders. diff --git a/Language/Reference/User-Interface-Help/boundcolumn-property.md b/Language/Reference/User-Interface-Help/boundcolumn-property.md index f4695666b0e..3aec96c0fcb 100644 --- a/Language/Reference/User-Interface-Help/boundcolumn-property.md +++ b/Language/Reference/User-Interface-Help/boundcolumn-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Identifies the source of data in a multicolumn **ComboBox** or **ListBox**. - **Syntax** - _object_. **BoundColumn** [= _Variant_ ] + +## Syntax + +_object_. **BoundColumn** [= _Variant_ ] The **BoundColumn** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Variant_ are: |0|Assigns the value of the **ListIndex** property to the control.| |1 or greater|Assigns the value from the specified column to the control. Columns are numbered from 1 when using this property (default).| - **Remarks** +## Remarks + When the user chooses a row in a multicolumn **ListBox** or **ComboBox**, the **BoundColumn** property identifies which item from that row to store as the value of the control. For example, if each row contains 8 items and **BoundColumn** is 3, the system stores the information in the third column of the currently-selected row as the value of the object. You can display one set of data to users but store different, associated values for the object by using the **BoundColumn** and the **TextColumn** properties. **TextColumn** identifies the column of data displayed in text box portion of a **ComboBox** and the value stored in the **Text** property; **BoundColumn** identifies the column of associated data values stored for the control. For example, you could set up a multicolumn **ListBox** that contains the names of holidays in one column and dates for the holidays in a second column. To present the holiday names to users, specify the first column as the **TextColumn**. To store the dates of the holidays, specify the second column as the **BoundColumn**. To hide the dates of the holidays, set the **ColumnWidths** property of the sceond column to zero. If the control is [bound](../../../language/Glossary/glossary-vba.md) to a[data source](../../../language/Glossary/glossary-vba.md), the value in the column specified by **BoundColumn** is stored in the data source named in the **ControlSource** property. diff --git a/Language/Reference/User-Interface-Help/boundvalue-property.md b/Language/Reference/User-Interface-Help/boundvalue-property.md index b7f121e1cb3..76b27ab84a8 100644 --- a/Language/Reference/User-Interface-Help/boundvalue-property.md +++ b/Language/Reference/User-Interface-Help/boundvalue-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Contains the value of a control when that control receives the focus. - **Syntax** - _object_. **BoundValue** [= _Variant_ ] + +## Syntax + +_object_. **BoundValue** [= _Variant_ ] The **BoundValue** property syntax has these parts: @@ -45,8 +47,9 @@ The **BoundValue** property syntax has these parts: ||Zero (0) indicates the first page. The maximum value is one less than the number of pages.| |**TextBox**|The text in the edit region.| - **Remarks** - **BoundValue** applies to the control that has the focus. +## Remarks + +**BoundValue** applies to the control that has the focus. The contents of the **BoundValue** and **Value** properties are identical most of the time. When the user edits a control so that its value changes, the contents of **BoundValue** and **Value** are different until the change is final. Several things occur when the user changes the value of a control. For example, if a user changes the text in a **TextBox**, the following things occur: diff --git a/Language/Reference/User-Interface-Help/buildfilename-property.md b/Language/Reference/User-Interface-Help/buildfilename-property.md index 2c57d097147..02c7c7800b5 100644 --- a/Language/Reference/User-Interface-Help/buildfilename-property.md +++ b/Language/Reference/User-Interface-Help/buildfilename-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Sets or returns the DLL name that will be used when the project is built. - **Syntax** - _object_**.BuildFileName** + +## Syntax + +_object_**.BuildFileName** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. diff --git a/Language/Reference/User-Interface-Help/buildpath-method.md b/Language/Reference/User-Interface-Help/buildpath-method.md index acc0784a4b1..b5f144aa826 100644 --- a/Language/Reference/User-Interface-Help/buildpath-method.md +++ b/Language/Reference/User-Interface-Help/buildpath-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Appends a name to an existing path. - **Syntax** - _object_. **BuildPath(**_path_, _name_**)** + +## Syntax + +_object_. **BuildPath(**_path_, _name_**)** The **BuildPath** method syntax has these parts: @@ -28,6 +30,7 @@ The **BuildPath** method syntax has these parts: | _path_|Required. Existing path to which _name_ is appended. Path can be absolute or relative and need not specify an existing folder.| | _name_|Required. Name being appended to the existing _path_.| - **Remarks** +## Remarks + The **BuildPath** method inserts an additional path separator between the existing path and the name, only if necessary. diff --git a/Language/Reference/User-Interface-Help/calendar-property.md b/Language/Reference/User-Interface-Help/calendar-property.md index 53f8015e3e0..c1063e0a7ee 100644 --- a/Language/Reference/User-Interface-Help/calendar-property.md +++ b/Language/Reference/User-Interface-Help/calendar-property.md @@ -24,7 +24,8 @@ You can use one of two settings for **Calendar**: |**vbCalGreg**|0|Use Gregorian calendar (default).| |**vbCalHijri**|1|Use Hijri calendar.| - **Remarks** +## Remarks + You can only set the **Calendar** property programmatically. For example, to use the Hijri calendar, use: diff --git a/Language/Reference/User-Interface-Help/call-statement.md b/Language/Reference/User-Interface-Help/call-statement.md index fd99f18c1af..f26d8a5ff2f 100644 --- a/Language/Reference/User-Interface-Help/call-statement.md +++ b/Language/Reference/User-Interface-Help/call-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Transfers control to a **Sub** procedure, **Function** procedure, or [dynamic-link library (DLL)](../../Glossary/vbe-glossary.md) [procedure](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax [ **Call** ] _name_ [ _argumentlist_ ] diff --git a/Language/Reference/User-Interface-Help/callbyname-function.md b/Language/Reference/User-Interface-Help/callbyname-function.md index 03e2662171f..2c046cdfef7 100644 --- a/Language/Reference/User-Interface-Help/callbyname-function.md +++ b/Language/Reference/User-Interface-Help/callbyname-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Executes a method of an object, or sets or returns a property of an [object](../../Glossary/vbe-glossary.md). - **Syntax** - **CallByName( _object_**_, procname, calltype,[args()]_**)** + +## Syntax + +**CallByName( _object_**_, procname, calltype,[args()]_**)** The **CallByName** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -26,7 +28,8 @@ The **CallByName** function syntax has these[named arguments](../../Glossary/vb |**_calltype_**|Required; **Constant**. A constant of type **vbCallType** representing the type of procedure being called.| | _args()_|Optional: **Variant** (**Array**).| - **Remarks** +## Remarks + The **CallByName** function is used to get or set a property, or invoke a method at run time using a string name. In the following example, the first line uses **CallByName** to set the **MousePointer** property of a text box, the second line gets the value of the **MousePointer** property, and the third line invokes the **Move** method to move the text box: diff --git a/Language/Reference/User-Interface-Help/cancel-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/cancel-property-microsoft-forms.md index 15c4acc3181..47ab363b18b 100644 --- a/Language/Reference/User-Interface-Help/cancel-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/cancel-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns or sets a value indicating whether a command button is the Cancel button on a form. - **Syntax** - _object_. **Cancel** [= _Boolean_ ] + +## Syntax + +_object_. **Cancel** [= _Boolean_ ] The **Cancel** property syntax has these parts: @@ -33,7 +35,8 @@ The settings for _Boolean_ are: |**True**|The **CommandButton** is the Cancel button.| |**False**|The **CommandButton** is not the Cancel button (default).| - **Remarks** +## Remarks + A **CommandButton** or an object that acts like a command button can be designated as the default command button. For[OLE container controls](../../../language/Glossary/glossary-vba.md) (Windows only), the **Cancel** property is provided only for those objects that specifically behave as command buttons. Only one **CommandButton** on a form can be the Cancel button. Setting **Cancel** to **True** for one command button automatically sets it to **False** for all other objects on the form. When a **CommandButton's Cancel** property is set to **True** and the form is the active form, the user can choose the command button by clicking it, pressing ESC, or pressing ENTER when the button has the[focus](../../Glossary/vbe-glossary.md). A typical use of **Cancel** is to give the user the option of canceling uncommitted changes and returning the form to its previous state. diff --git a/Language/Reference/User-Interface-Help/canpaste-property.md b/Language/Reference/User-Interface-Help/canpaste-property.md index 20f522ab739..e3751d315be 100644 --- a/Language/Reference/User-Interface-Help/canpaste-property.md +++ b/Language/Reference/User-Interface-Help/canpaste-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether the Clipboard contains data that the object supports. - **Syntax** - _object_. **CanPaste** + +## Syntax + +_object_. **CanPaste** The **CanPaste** property syntax has these parts: @@ -34,7 +36,8 @@ The **CanPaste** property return values are: |**True**|The object underneath the mouse pointer can receive information pasted from the Clipboard (default).| |**False**|The object underneath the mouse pointer cannot receive information pasted from the Clipboard.| - **Remarks** - **CanPaste** is read-only. +## Remarks + +**CanPaste** is read-only. If the Clipboard data is in a [format](../../../language/Glossary/glossary-vba.md) that the current[target](../../../language/Glossary/glossary-vba.md) object does not support, the **CanPaste** property is **False**. For example, if you try to paste a bitmap into an object that only supports text, **CanPaste** will be **False**. diff --git a/Language/Reference/User-Interface-Help/canredo-property.md b/Language/Reference/User-Interface-Help/canredo-property.md index 9e3dffdd8d9..2ab97c8b01a 100644 --- a/Language/Reference/User-Interface-Help/canredo-property.md +++ b/Language/Reference/User-Interface-Help/canredo-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Indicates whether the most recent Undo can be reversed. - **Syntax** - _object_. **CanRedo** + +## Syntax + +_object_. **CanRedo** The **CanRedo** property syntax has these parts: @@ -34,8 +36,9 @@ The **CanRedo** property return values are: |**True**|The most recent Undo can be reversed.| |**False**|The most recent Undo is irreversible.| - **Remarks** - **CanRedo** is read-only. +## Remarks + +**CanRedo** is read-only. To Redo an action means to reverse an Undo; it does not necessarily mean to repeat the last user action. The following user actions illustrate using Undo and Redo: diff --git a/Language/Reference/User-Interface-Help/canundo-property.md b/Language/Reference/User-Interface-Help/canundo-property.md index cff89d73116..dc7f0f4f81c 100644 --- a/Language/Reference/User-Interface-Help/canundo-property.md +++ b/Language/Reference/User-Interface-Help/canundo-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Indicates whether the last user action can be undone. - **Syntax** - _object_. **CanUndo** + +## Syntax + +_object_. **CanUndo** The **CanUndo** property syntax has these parts: @@ -34,7 +36,8 @@ The **CanUndo** property return values are: |**True**|The most recent user action can be undone.| |**False**|The most recent user action cannot be undone.| - **Remarks** - **CanUndo** is read-only. +## Remarks + +**CanUndo** is read-only. Many user actions can be undone with the Undo command. The **CanUndo** property indicates whether the most recent action can be undone. diff --git a/Language/Reference/User-Interface-Help/caption-propert-microsoft-forms.md b/Language/Reference/User-Interface-Help/caption-propert-microsoft-forms.md index 3469626fc08..83540b0c2c0 100644 --- a/Language/Reference/User-Interface-Help/caption-propert-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/caption-propert-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Descriptive text that appears on an object to identify or describe it. - **Syntax** - _object_. **Caption** [= _String_ ] + +## Syntax + +_object_. **Caption** [= _String_ ] The **Caption** property syntax has these parts: @@ -26,7 +28,9 @@ The **Caption** property syntax has these parts: **Settings** The default setting for a control is a unique name based on the type of control. For example, CommandButton1 is the default caption for the first command button in a form. - **Remarks** + +## Remarks + The text identifies or describes the object with which it is associated. For buttons and labels, the **Caption** property specifies the text that appears in the control. For **Page** and **Tab** objects, it specifies the text that appears on the tab. If a control's caption is too long, the caption is truncated. If a form's caption is too long for the title bar, the title is displayed with an ellipsis. The **ForeColor** property of the control determines the color of the text in the caption. diff --git a/Language/Reference/User-Interface-Help/caption-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/caption-property-vba-add-in-object-model.md index 9b48c9c2204..119f048e887 100644 --- a/Language/Reference/User-Interface-Help/caption-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/caption-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns a [String](../../Glossary/vbe-glossary.md) containing the title of the active window. Read-only. - **Remarks** + +## Remarks + The title of the active window is the text displayed in the window's title bar. diff --git a/Language/Reference/User-Interface-Help/carrot-operator.md b/Language/Reference/User-Interface-Help/carrot-operator.md index 34ef775099a..3bdb2f319ec 100644 --- a/Language/Reference/User-Interface-Help/carrot-operator.md +++ b/Language/Reference/User-Interface-Help/carrot-operator.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to raise a number to the power of an exponent. - **Syntax** - _result_**=**_number_**^**_exponent_ + +## Syntax + +_result_**=**_number_**^**_exponent_ The **^** operator syntax has these parts: @@ -25,7 +27,8 @@ The **^** operator syntax has these parts: | _number_|Required; any [numeric expression](../../Glossary/vbe-glossary.md).| | _exponent_|Required; any numeric expression.| - **Remarks** +## Remarks + A _number_ can be negative only if _exponent_ is an integer value. When more than one exponentiation is performed in a single[expression](../../Glossary/vbe-glossary.md), the **^** operator is evaluated as it is encountered from left to right. Usually, the [data type](../../Glossary/vbe-glossary.md) of _result_ is a[Double](../../Glossary/vbe-glossary.md) or a[Variant](../../Glossary/vbe-glossary.md) containing a **Double**. However, if either _number_ or _exponent_ is a[Null](../../Glossary/vbe-glossary.md) expression, _result_ is **Null**. diff --git a/Language/Reference/User-Interface-Help/change-event.md b/Language/Reference/User-Interface-Help/change-event.md index 481fab0fb08..0c744f37d62 100644 --- a/Language/Reference/User-Interface-Help/change-event.md +++ b/Language/Reference/User-Interface-Help/change-event.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Occurs when the **Value** property changes. - **Syntax** - **Private Sub**_object_ _**Change( )** + +## Syntax + +**Private Sub**_object_ _**Change( )** The **Change** event syntax has these parts: @@ -41,9 +43,9 @@ Here are some examples of actions that change the **Value** property: - Clicking the up arrow or down arrow on a **SpinButton**. - Selecting a different page on a **MultiPage**. - - **Remarks** +## Remarks + The Change event procedure can synchronize or coordinate data displayed among controls. For example, you can use the Change event procedure of a **ScrollBar** to update the contents of a **TextBox** that displays the value of the **ScrollBar**. Or you can use a Change event procedure to display data and formulas in a work area and results in another area. **Note** In some cases, the Click event may also occur when the **Value** property changes. However, using the Change event is the preferred technique for detecting a new value for a property. diff --git a/Language/Reference/User-Interface-Help/chdrive-statement.md b/Language/Reference/User-Interface-Help/chdrive-statement.md index c202893849f..28a70f4ed01 100644 --- a/Language/Reference/User-Interface-Help/chdrive-statement.md +++ b/Language/Reference/User-Interface-Help/chdrive-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Changes the current drive. - **Syntax** +## Syntax - **ChDrive**_drive_ +**ChDrive**_drive_ The required _drive_[argument](../../Glossary/vbe-glossary.md) is a[string expression](../../Glossary/vbe-glossary.md) that specifies an existing drive. If you supply a zero-length string (""), the current drive doesn't change. If the _drive_ argument is a multiple-character string, **ChDrive** uses only the first letter. On the Macintosh, **ChDrive** changes the current folder to the root folder of the specified drive. diff --git a/Language/Reference/User-Interface-Help/checkbox-control.md b/Language/Reference/User-Interface-Help/checkbox-control.md index d35bc6596c1..1b97010958f 100644 --- a/Language/Reference/User-Interface-Help/checkbox-control.md +++ b/Language/Reference/User-Interface-Help/checkbox-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Displays the selection state of an item. - **Remarks** + +## Remarks + Use a **CheckBox** to give the user a choice between two values such as _Yes_ / _No_, _True_ / _False_, or _On_ / _Off_. When the user selects a **CheckBox**, it displays a special mark (such as an X) and its current setting is _Yes_, _True_, or _On_; if the user does not select the **CheckBox**, it is empty and its setting is _No_, _False_, or _Off_. Depending on the value of the **TripleState** property, a **CheckBox** can also have a[null](../../Glossary/vbe-glossary.md) value. If a **CheckBox** is[bound](../../../language/Glossary/glossary-vba.md) to a[data source](../../../language/Glossary/glossary-vba.md), changing the setting changes the value of that source. A disabled **CheckBox** shows the current value, but is dimmed and does not allow changes to the value from the user interface. You can also use check boxes inside a group box to select one or more of a group of related items. For example, you can create an order form that contains a list of available items, with a **CheckBox** preceding each item. The user can select a particular item or items by checking the corresponding **CheckBox**. diff --git a/Language/Reference/User-Interface-Help/choose-function.md b/Language/Reference/User-Interface-Help/choose-function.md index 379c002c7dc..ff0890cea0e 100644 --- a/Language/Reference/User-Interface-Help/choose-function.md +++ b/Language/Reference/User-Interface-Help/choose-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Selects and returns a value from a list of [arguments](../../Glossary/vbe-glossary.md). - **Syntax** - **Choose(**_index_, _choice-1_ [, _choice-2_, _..._ [, _choice-n_ ]] **)** + +## Syntax + +**Choose(**_index_, _choice-1_ [, _choice-2_, _..._ [, _choice-n_ ]] **)** The **Choose** function syntax has these parts: @@ -24,8 +26,9 @@ The **Choose** function syntax has these parts: | _index_|Required. [Numeric expression](../../Glossary/vbe-glossary.md) or field that results in a value between 1 and the number of available choices.| | _choice_|Required. [Variant expression](../../Glossary/vbe-glossary.md) containing one of the possible choices.| - **Remarks** - **Choose** returns a value from the list of choices based on the value of _index_. If _index_ is 1, **Choose** returns the first choice in the list; if _index_ is 2, it returns the second choice, and so on. +## Remarks + +**Choose** returns a value from the list of choices based on the value of _index_. If _index_ is 1, **Choose** returns the first choice in the list; if _index_ is 2, it returns the second choice, and so on. You can use **Choose** to look up a value in a list of possibilities. For example, if _index_ evaluates to 3 and _choice-1_ = "one", _choice-2_ = "two", and _choice-3_ = "three", **Choose** returns "three". This capability is particularly useful if _index_ represents the value in an option group. **Choose** evaluates every choice in the list, even though it returns only one. For this reason, you should watch for undesirable side effects. For example, if you use the **MsgBox** function as part of an[expression](../../Glossary/vbe-glossary.md) in all the choices, a message box will be displayed for each choice as it is evaluated, even though **Choose** returns the value of only one of them. The **Choose** function returns a[Null](../../Glossary/vbe-glossary.md) if _index_ is less than 1 or greater than the number of choices listed. diff --git a/Language/Reference/User-Interface-Help/chr-function.md b/Language/Reference/User-Interface-Help/chr-function.md index 7bcf3de0ec9..52fa4e769a0 100644 --- a/Language/Reference/User-Interface-Help/chr-function.md +++ b/Language/Reference/User-Interface-Help/chr-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a [String](../../Glossary/vbe-glossary.md) containing the character associated with the specified[character code](../../Glossary/vbe-glossary.md). - **Syntax** - **Chr(**_charcode_**)** + +## Syntax + +**Chr(**_charcode_**)** The required _charcode_[argument](../../Glossary/vbe-glossary.md) is a[Long](../../Glossary/vbe-glossary.md) that identifies a character. - **Remarks** + +## Remarks + Numbers from 0 - 31 are the same as standard, nonprintable [ASCII](../../Glossary/vbe-glossary.md) codes. For example, **Chr(** 10 **)** returns a linefeed character. The normal range for _charcode_ is 0 - 255. However, on[DBCS](../../Glossary/vbe-glossary.md) systems, the actual range for _charcode_ is -32768 to 65535. **Note** The **ChrB** function is used with byte data contained in a **String**. Instead of returning a character, which may be one or two bytes, **ChrB** always returns a single byte. The **ChrW** function returns a **String** containing the[Unicode](../../Glossary/vbe-glossary.md) character except on platforms where Unicode is not supported, in which case, the behavior is identical to the **Chr** function. diff --git a/Language/Reference/User-Interface-Help/clear-method-microsoft-forms.md b/Language/Reference/User-Interface-Help/clear-method-microsoft-forms.md index f0bf19a1254..fff4ddde05c 100644 --- a/Language/Reference/User-Interface-Help/clear-method-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/clear-method-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Removes all objects from an object or [collection](../../Glossary/vbe-glossary.md). - **Syntax** - _object_. **Clear** + +## Syntax + +_object_. **Clear** The **Clear** method syntax has these parts: @@ -23,7 +25,8 @@ The **Clear** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + For a **MultiPage** or **TabStrip**, the **Clear** method deletes individual pages or tabs. For a **ListBox** or **ComboBox**, **Clear** removes all entries in the list. For a **Controls** collection, **Clear** deletes controls that were created at[run time](../../Glossary/vbe-glossary.md) with the **Add** method. Using **Clear** on controls created at[design time](../../Glossary/vbe-glossary.md) causes an error. diff --git a/Language/Reference/User-Interface-Help/clear-method-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/clear-method-visual-basic-for-applications.md index fc2a7a6d902..2952dca8d93 100644 --- a/Language/Reference/User-Interface-Help/clear-method-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/clear-method-visual-basic-for-applications.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Clears all [property](../../Glossary/vbe-glossary.md) settings of the **Err** object. - **Syntax** - _object_**.Clear** + +## Syntax + +_object_**.Clear** The _object_ is always the **Err** object. - **Remarks** + +## Remarks + Use **Clear** to explicitly clear the **Err** object after an error has been handled, for example, when you use deferred error handling with **On Error Resume Next**. The **Clear** method is called automatically whenever any of the following[statements](../../Glossary/vbe-glossary.md) is executed: diff --git a/Language/Reference/User-Interface-Help/click-event-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/click-event-vba-add-in-object-model.md index 0b97017cbf7..5e70ce6dda4 100644 --- a/Language/Reference/User-Interface-Help/click-event-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/click-event-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Occurs when the **OnAction**[property](../../Glossary/vbe-glossary.md) of a corresponding command bar control is set. - **Syntax** - **Sub**_object_**_Click (ByVal** **_ctrl_** **As Object**, **ByRef** **_handled_** **As Boolean**, **ByRef** **_canceldefault_** **As Boolean)** + +## Syntax + +**Sub**_object_**_Click (ByVal** **_ctrl_** **As Object**, **ByRef** **_handled_** **As Boolean**, **ByRef** **_canceldefault_** **As Boolean)** The Click event syntax has these [named arguments](../../Glossary/vbe-glossary.md): @@ -25,6 +27,7 @@ The Click event syntax has these [named arguments](../../Glossary/vbe-glossary.m |**_handled_**|Required; [Boolean](../../Glossary/vbe-glossary.md). If **True**, other[add-ins](../../Glossary/vbe-glossary.md) should handle the event. If **False**, the action of the command bar item has not been handled.| |**_canceldefault_**|Required; **Boolean**. If **True**, default behavior is performed unless canceled by a downstream add-in. If **False**, default behavior is not performed unless restored by a downstream add-in.| - **Remarks** +## Remarks + The Click event is specific to the **CommandBarEvents** object. Use a[variable](../../Glossary/vbe-glossary.md) declared using the **WithEvents** keyword to receive the Click event for a **CommandBar** control. This variable should be set to the return value of the **CommandBarEvents** property of the **Events** object. The **CommandBarEvents** property takes the **CommandBar** control as an[argument](../../Glossary/vbe-glossary.md). When the **CommandBar** control is clicked (for the variable you declared using the **WithEvents** keyword), the code is executed. diff --git a/Language/Reference/User-Interface-Help/click-event.md b/Language/Reference/User-Interface-Help/click-event.md index eaf1ff3f168..5855c892b02 100644 --- a/Language/Reference/User-Interface-Help/click-event.md +++ b/Language/Reference/User-Interface-Help/click-event.md @@ -21,9 +21,9 @@ Occurs in one of two cases: - The user clicks a control with the mouse. - The user definitively selects a value for a control with more than one possible value. - - **Syntax** +## Syntax + For MultiPage, TabStrip **Private Sub**_object_ _**Click(**_index_**As Long)** For all other controls **Private Sub**_object_ _**Click( )** The **Click** event syntax has these parts: @@ -34,7 +34,8 @@ The **Click** event syntax has these parts: | _object_|Required. A valid object.| | _index_|Required. The index of the page or tab in a **MultiPage** or **TabStrip** associated with this event.| - **Remarks** +## Remarks + Of the two cases where the Click event occurs, the first case applies to the **CommandButton**, **Frame**, **Image**, **Label**, **ScrollBar**, and **SpinButton**. The second case applies to the **CheckBox**, **ComboBox**, **ListBox**, **MultiPage**, **TabStrip**, and **ToggleButton**. It also applies to an **OptionButton** when the value changes to **True**. The following are examples of actions that initiate the Click event: diff --git a/Language/Reference/User-Interface-Help/clientheight-clientleft-clienttop-clientwidth-properties.md b/Language/Reference/User-Interface-Help/clientheight-clientleft-clienttop-clientwidth-properties.md index 43524b47454..b38cf963e56 100644 --- a/Language/Reference/User-Interface-Help/clientheight-clientleft-clienttop-clientwidth-properties.md +++ b/Language/Reference/User-Interface-Help/clientheight-clientleft-clienttop-clientwidth-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Define the dimensions and location of the display area of a **TabStrip**. - **Syntax** - _object_. **ClientHeight** [ = _Single_ ] + +## Syntax + +_object_. **ClientHeight** [ = _Single_ ] _object_. **ClientLeft** [ = _Single_ ] _object_. **ClientTop** [ = _Single_ ] _object_. **ClientWidth** [ = _Single_ ] @@ -27,6 +29,7 @@ The **ClientHeight**, **ClientLeft**, **ClientTop**, and **ClientWidth** proper | _object_|Required. A valid object.| | _Single_|Optional. For **ClientHeight** and **ClientWidth**, specifies the height or width, in points, of the display area. For **ClientLeft** and **ClientTop**, specifies the distance, in points, from the top or left edge of the **TabStrip's** container.| - **Remarks** +## Remarks + At [run time](../../Glossary/vbe-glossary.md), **ClientLeft**, **ClientTop**, **ClientHeight**, and **ClientWidth** automatically store the coordinates and dimensions of the **TabStrip's** internal area, which is shared by objects in the **TabStrip**. diff --git a/Language/Reference/User-Interface-Help/close-method-filesystemobject-object.md b/Language/Reference/User-Interface-Help/close-method-filesystemobject-object.md index 96c1c1b5705..c44835bba09 100644 --- a/Language/Reference/User-Interface-Help/close-method-filesystemobject-object.md +++ b/Language/Reference/User-Interface-Help/close-method-filesystemobject-object.md @@ -15,7 +15,9 @@ ms.date: 06/08/2017 **Description** Closes an open **TextStream** file. - **Syntax** - _object_. **Close** + +## Syntax + +_object_. **Close** The _object_ is always the name of a **TextStream** object. diff --git a/Language/Reference/User-Interface-Help/close-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/close-method-vba-add-in-object-model.md index a5e95e922c9..14ebd943461 100644 --- a/Language/Reference/User-Interface-Help/close-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/close-method-vba-add-in-object-model.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Closes and destroys a window. - **Syntax** - _object_**.Close** + +## Syntax + +_object_**.Close** The _object_ placeholder is an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + The following types of windows respond to the **Close** method in different ways: diff --git a/Language/Reference/User-Interface-Help/close-statement.md b/Language/Reference/User-Interface-Help/close-statement.md index cebed2d5a0e..6ac953d69f0 100644 --- a/Language/Reference/User-Interface-Help/close-statement.md +++ b/Language/Reference/User-Interface-Help/close-statement.md @@ -13,13 +13,15 @@ ms.date: 06/08/2017 Concludes input/output (I/O) to a file opened using the **Open** statement. - **Syntax** +## Syntax - **Close** [ _filenumberlist_ ] +**Close** [ _filenumberlist_ ] The optional _filenumberlist_[argument](../../Glossary/vbe-glossary.md) can be one or more[file numbers](../../Glossary/vbe-glossary.md) using the following syntax, where _filenumber_ is any valid file number: [[ **#** ] _filenumber_ ] [ **,** [ **#** ] _filenumber_ ] **. . .** - **Remarks** + +## Remarks + If you omit _filenumberlist_, all active files opened by the **Open** statement are closed. When you close files that were opened for **Output** or **Append**, the final buffer of output is written to the operating system buffer for that file. All buffer space associated with the closed file is released. When the **Close** statement is executed, the association of a file with its file number ends. diff --git a/Language/Reference/User-Interface-Help/codemodule-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/codemodule-object-vba-add-in-object-model.md index cf36a0ceab1..eb9a1911a6c 100644 --- a/Language/Reference/User-Interface-Help/codemodule-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/codemodule-object-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Represents the code behind a component, such as a [form](../../Glossary/vbe-glossary.md), [class](../../Glossary/vbe-glossary.md), or [document](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + You use the **CodeModule** object to modify (add, delete, or edit) the code associated with a component. Each component is associated with one **CodeModule** object. However, a **CodeModule** object can be associated with multiple[code panes](../../Glossary/vbe-glossary.md). The methods associated with the **CodeModule** object enable you to manipulate and return information about the code text on a line-by-line basis. For example, you can use the **AddFromString** method to add text to the[module](../../Glossary/vbe-glossary.md). **AddFromString** places the text just above the first[procedure](../../Glossary/vbe-glossary.md) in the module or places the text at the end of the module if there are no procedures. diff --git a/Language/Reference/User-Interface-Help/codemodule-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/codemodule-property-vba-add-in-object-model.md index a8d70478981..17b4b137a69 100644 --- a/Language/Reference/User-Interface-Help/codemodule-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/codemodule-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns an object representing the code behind the component. Read-only. - **Remarks** + +## Remarks + The **CodeModule** property returns **Nothing** if the component doesn't have a[code module](../../Glossary/vbe-glossary.md) associated with it. **Note** The **CodePane** object represents a visible code window. A given component can have several **CodePane** objects. The **CodeModule** object represents the code within a component. A component can only have one **CodeModule** object. diff --git a/Language/Reference/User-Interface-Help/codepane-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/codepane-object-vba-add-in-object-model.md index fa5f4b64d88..e08bf362815 100644 --- a/Language/Reference/User-Interface-Help/codepane-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/codepane-object-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Represents a [code pane](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + Use the **CodePane** object to manipulate the position of visible text or the text selection displayed in the code pane. You can use the **Show** method to make the code pane you specify visible. Use the **SetSelection** method to set the selection in a code pane and the **GetSelection** method to return the location of the selection in a code pane. diff --git a/Language/Reference/User-Interface-Help/codepane-property.md b/Language/Reference/User-Interface-Help/codepane-property.md index 9fed61d74b8..983669affe6 100644 --- a/Language/Reference/User-Interface-Help/codepane-property.md +++ b/Language/Reference/User-Interface-Help/codepane-property.md @@ -16,6 +16,8 @@ ms.date: 06/08/2017 Returns a **CodePane** object. Read-only. - **Remarks** + +## Remarks + If a [code pane](../../Glossary/vbe-glossary.md) exists, it becomes the active code pane, and the window that contains it becomes the active window. If a code pane doesn't exist for the[module](../../Glossary/vbe-glossary.md), the **CodePane** property creates one. diff --git a/Language/Reference/User-Interface-Help/codepanes-collection-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/codepanes-collection-vba-add-in-object-model.md index 3bcce2de714..afbdd27d2d6 100644 --- a/Language/Reference/User-Interface-Help/codepanes-collection-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/codepanes-collection-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Contains the active [code panes](../../Glossary/vbe-glossary.md) in the **VBE** object. - **Remarks** + +## Remarks + Use the **CodePanes** collection to access the open code panes in a[project](../../Glossary/vbe-glossary.md). You can use the **Count** property to return the number of active code panes in a[collection](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/collection-object.md b/Language/Reference/User-Interface-Help/collection-object.md index e429facc490..e478173c185 100644 --- a/Language/Reference/User-Interface-Help/collection-object.md +++ b/Language/Reference/User-Interface-Help/collection-object.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 A **Collection** object is an ordered set of items that can be referred to as a unit. - **Remarks** + +## Remarks + The **Collection** object provides a convenient way to refer to a related group of items as a single object. The items, or[members](../../Glossary/vbe-glossary.md), in a collection need only be related by the fact that they exist in the [collection](../../Glossary/vbe-glossary.md). Members of a collection don't have to share the same [data type](../../Glossary/vbe-glossary.md). A collection can be created the same way other objects are created. For example: diff --git a/Language/Reference/User-Interface-Help/collection-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/collection-property-vba-add-in-object-model.md index 1defaf059eb..ab86835458a 100644 --- a/Language/Reference/User-Interface-Help/collection-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/collection-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns the [collection](../../Glossary/vbe-glossary.md) that contains the object you are working with. Read-only. - **Remarks** + +## Remarks + Most objects in this object model have either a **Parent** property or a **Collection** property that points to the object's parent object. Use the **Collection** property to access the[properties](../../Glossary/vbe-glossary.md), [methods](../../Glossary/vbe-glossary.md), and [controls](../../Glossary/vbe-glossary.md) of the collection to which the object belongs. diff --git a/Language/Reference/User-Interface-Help/column-property-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/column-property-visual-basic-for-applications.md index 3455d3609ce..87ca4fa035b 100644 --- a/Language/Reference/User-Interface-Help/column-property-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/column-property-visual-basic-for-applications.md @@ -15,9 +15,13 @@ ms.date: 06/08/2017 **Description** Read-only property that returns the column number of the current character position in a **TextStream** file. - **Syntax** - _object_**.Column** + +## Syntax + +_object_**.Column** The _object_ is always the name of a **TextStream** object. - **Remarks** + +## Remarks + After a newline character has been written, but before any other character is written, **Column** is equal to 1. diff --git a/Language/Reference/User-Interface-Help/column-property.md b/Language/Reference/User-Interface-Help/column-property.md index 80e2396812a..633f3a15f0b 100644 --- a/Language/Reference/User-Interface-Help/column-property.md +++ b/Language/Reference/User-Interface-Help/column-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies one or more items in a **ListBox** or **ComboBox**. - **Syntax** - _object_. **Column(**_column, row_**)** [= _Variant_ ] + +## Syntax + +_object_. **Column(**_column, row_**)** [= _Variant_ ] The **Column** property syntax has these parts: @@ -32,7 +34,9 @@ The **Column** property syntax has these parts: If you specify both the column and row values, **Column** reads or writes a specific item. If you specify only the column value, the **Column** property reads or writes the specified column in the current row of the object. For example, MyListBox.Column (3) reads or writes the third column in MyListBox. **Column** returns a _Variant_ from the cursor. When a built-in[cursor](../../../language/Glossary/glossary-vba.md) provides the value for _Variant_ (such as when using the **AddItem** method), the value is a string. When an external cursor provides the value for _Variant_, formatting associated with the data is not included in the _Variant_. - **Remarks** + +## Remarks + You can use **Column** to assign the contents of a combo box or list box to another control, such as a text box. For example, you can set the **ControlSource** property of a text box to the value in the second column of a list box. If the user makes no selection when you refer to a column in a combo box or list box, the **Column** setting is **Null**. You can check for this condition by using the IsNull function. You can also use **Column** to copy an entire two-dimensional[array](../../Glossary/vbe-glossary.md) of values to a control. This syntax lets you quickly load a list of choices rather than individually loading each element of the list using **AddItem**. diff --git a/Language/Reference/User-Interface-Help/columncount-property.md b/Language/Reference/User-Interface-Help/columncount-property.md index d4475f231a4..1a57d30939f 100644 --- a/Language/Reference/User-Interface-Help/columncount-property.md +++ b/Language/Reference/User-Interface-Help/columncount-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the number of columns to display in a list box or combo box. - **Syntax** - _object_. **ColumnCount** [= _Long_ ] + +## Syntax + +_object_. **ColumnCount** [= _Long_ ] The **ColumnCount** property syntax has these parts: @@ -26,7 +28,8 @@ The **ColumnCount** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. Specifies the number of columns to display.| - **Remarks** +## Remarks + If you set the **ColumnCount** property for a list box to 3 on an employee form, one column can list last names, another can list first names, and the third can list employee ID numbers. Setting **ColumnCount** to 0 displays zero columns, and setting it to -1 displays all the available columns. For an[unbound](../../../language/Glossary/glossary-vba.md)[data source](../../../language/Glossary/glossary-vba.md), there is a 10-column limit (0 to 9). You can use the **ColumnWidths** property to set the width of the columns displayed in the control. diff --git a/Language/Reference/User-Interface-Help/columnheads-property.md b/Language/Reference/User-Interface-Help/columnheads-property.md index a36490594a4..a00eeea8a66 100644 --- a/Language/Reference/User-Interface-Help/columnheads-property.md +++ b/Language/Reference/User-Interface-Help/columnheads-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Displays a single row of column headings for list boxes, combo boxes, and objects that accept column headings. - **Syntax** - _object_. **ColumnHeads** [= _Boolean_ ] + +## Syntax + +_object_. **ColumnHeads** [= _Boolean_ ] The **ColumnHeads** property syntax has these parts: @@ -36,6 +38,8 @@ The settings for _Boolean_ are: |**False**|Do not display column headings (default).| Headings in combo boxes appear only when the list drops down. - **Remarks** + +## Remarks + When the system uses the first row of data items as column headings, they can't be selected. diff --git a/Language/Reference/User-Interface-Help/columnwidths-property.md b/Language/Reference/User-Interface-Help/columnwidths-property.md index e771f8b2872..df319a55c96 100644 --- a/Language/Reference/User-Interface-Help/columnwidths-property.md +++ b/Language/Reference/User-Interface-Help/columnwidths-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the width of each column in a multicolumn combo box or list box. - **Syntax** - _object_. **ColumnWidths** [= _String_ ] + +## Syntax + +_object_. **ColumnWidths** [= _String_ ] The **ColumnWidths** property syntax has these parts: @@ -43,6 +45,7 @@ Unless specified otherwise, column widths are measured in points. To specify ano |2 in;;2 in|The first column is 2 inches, the second column is 1 inch (default), and the third column is 2 inches. Because only half of the third column is visible, a horizontal scroll bar appears.| |(Blank)|All three columns are the same width (1.33 inches).| - **Remarks** +## Remarks + In a combo box, the system displays the column designated by the **TextColumn** property in the text box portion of the control. diff --git a/Language/Reference/User-Interface-Help/combobox-control.md b/Language/Reference/User-Interface-Help/combobox-control.md index 5180026fb62..d6249b96f86 100644 --- a/Language/Reference/User-Interface-Help/combobox-control.md +++ b/Language/Reference/User-Interface-Help/combobox-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Combines the features of a **ListBox** and a **TextBox**. The user can enter a new value, as with a **TextBox**, or the user can select an existing value as with a **ListBox**. - **Remarks** + +## Remarks + If a **ComboBox** is[bound](../../../language/Glossary/glossary-vba.md) to a[data source](../../../language/Glossary/glossary-vba.md), then the **ComboBox** inserts the value the user enters or selects into that data source. If a multicolumn combo box is bound, then the **BoundColumn** property determines which value is stored in the bound data source. The list in a **ComboBox** consists of rows of data. Each row can have one or more columns, which can appear with or without headings. Some applications do not support column headings, others provide only limited support. The default property of a **ComboBox** is the **Value** property. diff --git a/Language/Reference/User-Interface-Help/command-function.md b/Language/Reference/User-Interface-Help/command-function.md index 873070335af..cd194a38ea4 100644 --- a/Language/Reference/User-Interface-Help/command-function.md +++ b/Language/Reference/User-Interface-Help/command-function.md @@ -14,9 +14,13 @@ ms.date: 06/08/2017 Returns the [argument](../../Glossary/vbe-glossary.md) portion of the[command line](../../Glossary/vbe-glossary.md) used to launch Microsoft Visual Basic or an executable program developed with Visual Basic. The Visual Basic **Command** function is not available in Microsoft Office applications. - **Syntax** - **Command** - **Remarks** + +## Syntax + +**Command** + +## Remarks + When Visual Basic is launched from the command line, any portion of the command line that follows `/cmd` is passed to the program as the command-line argument. In the following example, is passed to the program as the command-line argument. In the following command line example, `cmdlineargs` represents the argument information returned by the **Command** function. diff --git a/Language/Reference/User-Interface-Help/commandbar-object.md b/Language/Reference/User-Interface-Help/commandbar-object.md index 4ba356daab3..fd7bc1bc53b 100644 --- a/Language/Reference/User-Interface-Help/commandbar-object.md +++ b/Language/Reference/User-Interface-Help/commandbar-object.md @@ -13,6 +13,8 @@ ms.date: 06/08/2017 The **CommandBar** object contains other **CommandBar** objects, which can act as either buttons or menu commands. - **Syntax** - **CommandBar** + +## Syntax + +**CommandBar** diff --git a/Language/Reference/User-Interface-Help/commandbarevents-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/commandbarevents-object-vba-add-in-object-model.md index 2dcb9c2dd8b..ff77d183c7e 100644 --- a/Language/Reference/User-Interface-Help/commandbarevents-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/commandbarevents-object-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returned by the **CommandBarEvents** property. The **CommandBarEvents** object triggers an event when a[control](../../Glossary/vbe-glossary.md) on the command bar is clicked. - **Remarks** + +## Remarks + The **CommandBarEvents** object is returned by the **CommandBarEvents** property of the **Events** object. The object that is returned has one event in its interface, the Click event. You can handle this event using the **WithEvents** object declaration. diff --git a/Language/Reference/User-Interface-Help/commandbarevents-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/commandbarevents-property-vba-add-in-object-model.md index c426157e0b8..41271607860 100644 --- a/Language/Reference/User-Interface-Help/commandbarevents-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/commandbarevents-property-vba-add-in-object-model.md @@ -22,6 +22,7 @@ The setting for the [argument](../../Glossary/vbe-glossary.md) you pass to the * |:-----|:-----| | _vbcontrol_|Must be an object of type **CommandBarControl**.| - **Remarks** +## Remarks + Use the **CommandBarEvents** property to return an[event source object](../../Glossary/vbe-glossary.md) that triggers an event when a command bar button is clicked. The argument passed to the **CommandBarEvents** property is the command bar control for which the Click event will be triggered. diff --git a/Language/Reference/User-Interface-Help/commandbars-collection-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/commandbars-collection-vba-add-in-object-model.md index e56c196b1e4..36d3b362b42 100644 --- a/Language/Reference/User-Interface-Help/commandbars-collection-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/commandbars-collection-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Contains all of the command bars in a [project](../../Glossary/vbe-glossary.md), including command bars that support shortcut menus. - **Remarks** + +## Remarks + Use the **CommandBars** collection to enable[add-ins](../../Glossary/vbe-glossary.md) to add command bars and[controls](../../Glossary/vbe-glossary.md), or to add controls to existing, built-in, command bars. diff --git a/Language/Reference/User-Interface-Help/commandbutton-control.md b/Language/Reference/User-Interface-Help/commandbutton-control.md index 4984dada524..5cad489eb42 100644 --- a/Language/Reference/User-Interface-Help/commandbutton-control.md +++ b/Language/Reference/User-Interface-Help/commandbutton-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Starts, ends, or interrupts an action or series of actions. - **Remarks** + +## Remarks + The macro or event procedure assigned to the **CommandButton's** Click event determines what the **CommandButton** does. For example, you can create a **CommandButton** that opens another form. You can also display text, a picture, or both on a **CommandButton**. The default property of a **CommandButton** is the **Value** property. The default event for a **CommandButton** is the Click event. diff --git a/Language/Reference/User-Interface-Help/comparemode-property.md b/Language/Reference/User-Interface-Help/comparemode-property.md index 9160b150fbf..7fd6275ad2b 100644 --- a/Language/Reference/User-Interface-Help/comparemode-property.md +++ b/Language/Reference/User-Interface-Help/comparemode-property.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Sets and returns the comparison mode for comparing string keys in a **Dictionary** object. - **Syntax** - _object_. **CompareMode** [ = _compare_ ] + +## Syntax + +_object_. **CompareMode** [ = _compare_ ] The **CompareMode** property has the following parts: @@ -38,7 +40,8 @@ The _compare_ argument can have the following values: |**vbTextCompare**| 1|Performs a textual comparison.| |**vbDatabaseCompare**| 2|Microsoft Access only. Performs a comparison based on information in your database.| - **Remarks** +## Remarks + An error occurs if you try to change the comparison mode of a **Dictionary** object that already contains data. The **CompareMode** property uses the same values as the _compare_ argument for the **StrComp** function. Values greater than 2 can be used to refer to comparisons using specific Locale IDs (LCID). diff --git a/Language/Reference/User-Interface-Help/comparison-operators.md b/Language/Reference/User-Interface-Help/comparison-operators.md index ba0f086e192..4cf1094cb1d 100644 --- a/Language/Reference/User-Interface-Help/comparison-operators.md +++ b/Language/Reference/User-Interface-Help/comparison-operators.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to compare [expressions](../../Glossary/vbe-glossary.md). - **Syntax** - _result_**=**_expression1_ _comparisonoperator_ _expression2_ + +## Syntax + +_result_**=**_expression1_ _comparisonoperator_ _expression2_ _result_**=**_object1_**Is**_object2_ _result_**=**_string_**Like**_pattern_ [Comparison operators](../../Glossary/vbe-glossary.md) have these parts: @@ -30,7 +32,8 @@ Used to compare [expressions](../../Glossary/vbe-glossary.md). | _string_|Required; any [string expression](../../Glossary/vbe-glossary.md).| | _pattern_|Required; any string expression or range of characters.| - **Remarks** +## Remarks + The following table contains a list of the comparison operators and the conditions that determine whether _result_ is **True**, **False**, or[Null](../../Glossary/vbe-glossary.md): diff --git a/Language/Reference/User-Interface-Help/connect-property.md b/Language/Reference/User-Interface-Help/connect-property.md index 521880fb072..86e5d37c9bb 100644 --- a/Language/Reference/User-Interface-Help/connect-property.md +++ b/Language/Reference/User-Interface-Help/connect-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Returns or sets the connected state of an add-in. - **Remarks** + +## Remarks + Returns **True** if the add-in is registered and currently connected (active). Returns **False** if the add-in is registered, but not connected (inactive). diff --git a/Language/Reference/User-Interface-Help/const-directive.md b/Language/Reference/User-Interface-Help/const-directive.md index d01e41c6a14..994f75b5c1c 100644 --- a/Language/Reference/User-Interface-Help/const-directive.md +++ b/Language/Reference/User-Interface-Help/const-directive.md @@ -25,7 +25,8 @@ The **#Const** compiler directive syntax has these parts: | _constname_|Required; **Variant** (**String**). Name of the [constant](../../Glossary/vbe-glossary.md); follows standard [variable](../../Glossary/vbe-glossary.md) naming conventions.| | _expression_|Required. Literal, other conditional compiler constant, or any combination that includes any or all arithmetic or logical operators except **Is**.| - **Remarks** +## Remarks + Conditional compiler constants are always [Private](../../Glossary/vbe-glossary.md) to the [module](../../Glossary/vbe-glossary.md) in which they appear. It is not possible to create [Public](../../Glossary/vbe-glossary.md) compiler constants using the **#Const** directive. **Public** compiler constants can only be created in the user interface. Only conditional compiler constants and literals can be used in _expression_. Using a standard constant defined with **Const**, or using a constant that is undefined, causes an error to occur. Conversely, constants defined using the **#Const** [keyword](../../Glossary/vbe-glossary.md) can only be used for conditional compilation. Conditional compiler constants are always evaluated at the [module level](../../Glossary/vbe-glossary.md), regardless of their placement in code. diff --git a/Language/Reference/User-Interface-Help/const-statement.md b/Language/Reference/User-Interface-Help/const-statement.md index 7ca391e1b9a..4d082900a09 100644 --- a/Language/Reference/User-Interface-Help/const-statement.md +++ b/Language/Reference/User-Interface-Help/const-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Declares [constants](../../Glossary/vbe-glossary.md) for use in place of literal values. - **Syntax** +## Syntax [ **Public** | **Private** ] **Const** _constname_ [ **As** _type_ ] **=** _expression_ @@ -28,7 +28,8 @@ The **Const** statement syntax has these parts: | _type_|Optional. [Data type](../../Glossary/vbe-glossary.md) of the constant; may be [Byte](../../Glossary/vbe-glossary.md), [Boolean](../../Glossary/vbe-glossary.md), [Integer](../../Glossary/vbe-glossary.md), [Long](../../Glossary/vbe-glossary.md), [Currency](../../Glossary/vbe-glossary.md), [Single](../../Glossary/vbe-glossary.md), [Double](../../Glossary/vbe-glossary.md), [Decimal](../../Glossary/vbe-glossary.md) (not currently supported), [Date](../../Glossary/vbe-glossary.md), [String](../../Glossary/vbe-glossary.md), or [Variant](../../Glossary/vbe-glossary.md). Use a separate **As** _type_ clause for each constant being declared.| | _expression_|Required. Literal, other constant, or any combination that includes all arithmetic or logical operators except **Is**.| - **Remarks** +## Remarks + Constants are private by default. Within procedures, constants are always private; their visibility can't be changed. In [standard modules](../../Glossary/vbe-glossary.md), the default visibility of module-level constants can be changed using the **Public** keyword. In [class modules](../../Glossary/vbe-glossary.md), however, constants can only be private and their visibility can't be changed using the **Public** keyword. To combine several constant declarations on the same line, separate each constant assignment with a comma. When constant declarations are combined in this way, the **Public** or **Private** keyword, if used, applies to all of them. You can't use variables, user-defined functions, or intrinsic Visual Basic functions (such as **Chr**) in [expressions](../../Glossary/vbe-glossary.md) assigned to constants. diff --git a/Language/Reference/User-Interface-Help/controls-collection-microsoft-forms.md b/Language/Reference/User-Interface-Help/controls-collection-microsoft-forms.md index feaa0ec2a30..b052b2fa8ec 100644 --- a/Language/Reference/User-Interface-Help/controls-collection-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/controls-collection-microsoft-forms.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Includes all the controls contained in an object. - **Remarks** + +## Remarks + Each control in the **Controls** collection of an object has a unique index whose value can be either an integer or a string. The index value for the first control in a[collection](../../Glossary/vbe-glossary.md) is 0; the value for the second control is 1, and so on. This value indicates the order in which controls were added to the collection. If the index is a string, it represents the name of the control. The **Name** property of a control also specifies a control's name. You can use the **Controls** collection to enumerate or count individual controls, and to set their properties. For example, you can enumerate the **Controls** collection of a particular form and set the **Height** property of each control to a specified value. diff --git a/Language/Reference/User-Interface-Help/controlsource-property.md b/Language/Reference/User-Interface-Help/controlsource-property.md index 61fa6179622..8888aa91c9d 100644 --- a/Language/Reference/User-Interface-Help/controlsource-property.md +++ b/Language/Reference/User-Interface-Help/controlsource-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Identifies the data location used to set or store the **Value** property of a control. The **ControlSource** property accepts worksheet ranges from Microsoft Excel. - **Syntax** - _object_. **ControlSource** [= _String_ ] + +## Syntax + +_object_. **ControlSource** [= _String_ ] The **ControlSource** property syntax has these parts: @@ -26,7 +28,8 @@ The **ControlSource** property syntax has these parts: | _object_|Required. A valid object.| | _String_|Optional. Specifies the worksheet cell linked to the **Value** property of a control.| - **Remarks** +## Remarks + The **ControlSource** property identifies a cell or field; it does not contain the data stored in the cell or field. If you change the **Value** of the control, the change is automatically reflected in the linked cell or field. Similarly, if you change the value of the linked cell or field, the change is automatically reflected in the **Value** of the control. You cannot specify another control for the **ControlSource**. Doing so causes an error. The default value for **ControlSource** is an empty string. If **ControlSource** contains a value other than an empty string, it identifies a linked cell or field. The contents of that cell or field are automatically copied to the **Value** property when the control is loaded. diff --git a/Language/Reference/User-Interface-Help/controltiptext-property.md b/Language/Reference/User-Interface-Help/controltiptext-property.md index bd200c9876e..4567c7e1f50 100644 --- a/Language/Reference/User-Interface-Help/controltiptext-property.md +++ b/Language/Reference/User-Interface-Help/controltiptext-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies text that appears when the user briefly holds the mouse pointer over a control without clicking. - **Syntax** - _object_. **ControlTipText** [= _String_ ] + +## Syntax + +_object_. **ControlTipText** [= _String_ ] The **ControlTipText** property syntax has these parts: @@ -26,7 +28,8 @@ The **ControlTipText** property syntax has these parts: | _object_|Required. A valid object.| | _String_|Optional. The text that appears when the user holds the mouse pointer over a control.| - **Remarks** +## Remarks + The **ControlTipText** property lets you give users tips about a control in a running form. The property can be set during[design time](../../Glossary/vbe-glossary.md) but only appears by the control during[run time](../../Glossary/vbe-glossary.md). The default value of **ControlTipText** is an empty string. When the value of **ControlTipText** is set to an empty string, no tip is available for that control. diff --git a/Language/Reference/User-Interface-Help/copy-method-microsoft-forms.md b/Language/Reference/User-Interface-Help/copy-method-microsoft-forms.md index 4baf1b7c9d5..08b1350b535 100644 --- a/Language/Reference/User-Interface-Help/copy-method-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/copy-method-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Copies the contents of an object to the Clipboard. - **Syntax** - _object_. **Copy** + +## Syntax + +_object_. **Copy** The **Copy** method syntax has these parts: @@ -23,7 +25,8 @@ The **Copy** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The original content remains on the object. The actual content that is copied depends on the object. For example, on a **Page**, the **Copy** method copies the currently selected control or controls. On a **TextBox** or **ComboBox**, it copies the currently selected text. Using **Copy** for a form, **Frame**, or **Page** copies the currently-active control. diff --git a/Language/Reference/User-Interface-Help/copy-method-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/copy-method-visual-basic-for-applications.md index 21aba8e39d3..6f6cd2712bb 100644 --- a/Language/Reference/User-Interface-Help/copy-method-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/copy-method-visual-basic-for-applications.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Copies a specified file or folder from one location to another. - **Syntax** - _object_. **Copy**_destination_ [, _overwrite_ ] + +## Syntax + +_object_. **Copy**_destination_ [, _overwrite_ ] The **Copy** method syntax has these parts: @@ -26,6 +28,7 @@ The **Copy** method syntax has these parts: | _destination_|Required. Destination where the file or folder is to be copied. Wildcard characters are not allowed.| | _overwrite_|Optional. **Boolean** value that is **True** (default) if existing files or folders are to be overwritten; **False** if they are not.| - **Remarks** +## Remarks + The results of the **Copy** method on a **File** or **Folder** are identical to operations performed using **FileSystemObject.CopyFile** or **FileSystemObject.CopyFolder** where the file or folder referred to by _object_ is passed as an argument. You should note, however, that the alternative methods are capable of copying multiple files or folders. diff --git a/Language/Reference/User-Interface-Help/copyfile-method.md b/Language/Reference/User-Interface-Help/copyfile-method.md index bbdb31cc574..d8e7efd7f6b 100644 --- a/Language/Reference/User-Interface-Help/copyfile-method.md +++ b/Language/Reference/User-Interface-Help/copyfile-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Copies one or more files from one location to another. - **Syntax** - _object_. **CopyFile**_source_, _destination_ [, _overwrite_ ] + +## Syntax + +_object_. **CopyFile**_source_, _destination_ [, _overwrite_ ] The **CopyFile** method syntax has these parts: @@ -29,7 +31,8 @@ The **CopyFile** method syntax has these parts: | _destination_|Required. Character string destination where the file or files from _source_ are to be copied. Wildcard characters are not allowed.| | _overwrite_|Optional. **Boolean** value that indicates if existing files are to be overwritten. If **True**, files are overwritten; if **False**, they are not. The default is **True**. Note that **CopyFile** will fail if _destination_ has the read-only attribute set, regardless of the value of _overwrite_.| - **Remarks** +## Remarks + Wildcard characters can only be used in the last path component of the _source_ argument. For example, you can use: diff --git a/Language/Reference/User-Interface-Help/copyfolder-method.md b/Language/Reference/User-Interface-Help/copyfolder-method.md index 98d42a522d6..cfcdeb95ee7 100644 --- a/Language/Reference/User-Interface-Help/copyfolder-method.md +++ b/Language/Reference/User-Interface-Help/copyfolder-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Recursively copies a folder from one location to another. - **Syntax** - _object_. **CopyFolder**_source_, _destination_ [, ove _r_ write] + +## Syntax + +_object_. **CopyFolder**_source_, _destination_ [, ove _r_ write] The **CopyFolder** method syntax has these parts: @@ -29,7 +31,8 @@ The **CopyFolder** method syntax has these parts: | _destination_|Required. Character string destination where the folder and subfolders from _source_ are to be copied. Wildcard characters are not allowed.| | _overwrite_|Optional. **Boolean** value that indicates if existing folders are to be overwritten. If **True**, files are overwritten; if **False**, they are not. The default is **True**.| - **Remarks** +## Remarks + Wildcard characters can only be used in the last path component of the _source_ argument. For example, you can use: diff --git a/Language/Reference/User-Interface-Help/cos-function.md b/Language/Reference/User-Interface-Help/cos-function.md index 2cfc851f230..744a061e813 100644 --- a/Language/Reference/User-Interface-Help/cos-function.md +++ b/Language/Reference/User-Interface-Help/cos-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Double** specifying the cosine of an angle. - **Syntax** - **Cos(**_number_**)** + +## Syntax + +**Cos(**_number_**)** The required _number_[argument](../../Glossary/vbe-glossary.md) is a[Double](../../Glossary/vbe-glossary.md) or any valid[numeric expression](../../Glossary/vbe-glossary.md) that expresses an angle in radians. - **Remarks** + +## Remarks + The **Cos** function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse. The result lies in the range -1 to 1. To convert degrees to radians, multiply degrees by [pi](../../Glossary/vbe-glossary.md)/180. To convert radians to degrees, multiply radians by 180/pi. diff --git a/Language/Reference/User-Interface-Help/count-property-filesystemobject-object.md b/Language/Reference/User-Interface-Help/count-property-filesystemobject-object.md index 6461e885652..e37a6ddedc2 100644 --- a/Language/Reference/User-Interface-Help/count-property-filesystemobject-object.md +++ b/Language/Reference/User-Interface-Help/count-property-filesystemobject-object.md @@ -15,10 +15,14 @@ ms.date: 06/08/2017 **Description** Returns the number of items in a collection or **Dictionary** object. Read-only. - **Syntax** - _object_. **Count** + +## Syntax + +_object_. **Count** The _object_ is always the name of one of the items in the Applies To list. - **Remarks** + +## Remarks + The following code illustrates use of the **Count** property: diff --git a/Language/Reference/User-Interface-Help/count-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/count-property-microsoft-forms.md index d37511f04a1..035a182be3f 100644 --- a/Language/Reference/User-Interface-Help/count-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/count-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns the number of objects in a [collection](../../Glossary/vbe-glossary.md). - **Syntax** - _object_. **Count** + +## Syntax + +_object_. **Count** The **Count** property syntax has these parts: @@ -23,7 +25,8 @@ The **Count** property syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The **Count** property is read only. Note that the index value for the first page or tab of a collection is zero, the value for the second page or tab is one, and so on. For example, if a **MultiPage** contains two pages, the indexes of the pages are 0 and 1, and the value of **Count** is 2. diff --git a/Language/Reference/User-Interface-Help/createeventproc-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/createeventproc-method-vba-add-in-object-model.md index dc24a0ed00b..8a24d6a2e6d 100644 --- a/Language/Reference/User-Interface-Help/createeventproc-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/createeventproc-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Creates an event [procedure](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.CreateEventProc(**_eventname_, _objectname_**) As Long** + +## Syntax + +_object_**.CreateEventProc(**_eventname_, _objectname_**) As Long** The **CreateEventProc** syntax has these parts: @@ -25,7 +27,8 @@ The **CreateEventProc** syntax has these parts: | _eventname_|Required. A [string expression](../../Glossary/vbe-glossary.md) specifying the name of the event you want to add to the[module](../../Glossary/vbe-glossary.md).| | _objectname_|Required. A string expression specifying the name of the object that is the source of the event.| - **Remarks** +## Remarks + Use the **CreateEventProc** method to create an event procedure. For example, to create an event procedure for the **Click** event of a **Command Button** control named `Command1` you would use the following code, where `CM` represents an object of type **CodeModule**: diff --git a/Language/Reference/User-Interface-Help/createfolder-method.md b/Language/Reference/User-Interface-Help/createfolder-method.md index 2da23b7c70d..dcc9b51c28e 100644 --- a/Language/Reference/User-Interface-Help/createfolder-method.md +++ b/Language/Reference/User-Interface-Help/createfolder-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Creates a folder. - **Syntax** - _object_. **CreateFolder(**_foldername_**)** + +## Syntax + +_object_. **CreateFolder(**_foldername_**)** The **CreateFolder** method has these parts: @@ -27,6 +29,7 @@ The **CreateFolder** method has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _foldername_|Required. [String expression](../../Glossary/vbe-glossary.md) that identifies the folder to create.| - **Remarks** +## Remarks + An error occurs if the specified folder already exists. diff --git a/Language/Reference/User-Interface-Help/createobject-function.md b/Language/Reference/User-Interface-Help/createobject-function.md index 01a2d507f5e..7fe5e92a0ba 100644 --- a/Language/Reference/User-Interface-Help/createobject-function.md +++ b/Language/Reference/User-Interface-Help/createobject-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Creates and returns a reference to an [ActiveX object](../../Glossary/vbe-glossary.md). - **Syntax** - **CreateObject(**_class,[servername]_**)** + +## Syntax + +**CreateObject(**_class,[servername]_**)** The **CreateObject** function syntax has these parts: @@ -32,7 +34,8 @@ The _class_[argument](../../Glossary/vbe-glossary.md) uses the syntax _appname_ | _appname_|Required; **Variant** (**String**). The name of the application providing the object.| | _objecttype_|Required; **Variant** (**String**). The type or[class](../../Glossary/vbe-glossary.md) of object to create.| - **Remarks** +## Remarks + Every application that supports Automation provides at least one type of object. For example, a word processing application may provide an **Application** object, a **Document** object, and a **Toolbar** object. To create an ActiveX object, assign the object returned by **CreateObject** to an[object variable](../../Glossary/vbe-glossary.md): diff --git a/Language/Reference/User-Interface-Help/createtextfile-method.md b/Language/Reference/User-Interface-Help/createtextfile-method.md index 48df9917176..a108665127c 100644 --- a/Language/Reference/User-Interface-Help/createtextfile-method.md +++ b/Language/Reference/User-Interface-Help/createtextfile-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Creates a specified file name and returns a **TextStream** object that can be used to read from or write to the file. - **Syntax** - _object_. **CreateTextFile(**_filename_ [ **,**_overwrite_ [ **,**_unicode_ ]] **)** + +## Syntax + +_object_. **CreateTextFile(**_filename_ [ **,**_overwrite_ [ **,**_unicode_ ]] **)** The **CreateTextFile** method has these parts: @@ -29,7 +31,8 @@ The **CreateTextFile** method has these parts: | _overwrite_|Optional. **Boolean** value that indicates if an existing file can be overwritten. The value is **True** if the file can be overwritten; **False** if it can't be overwritten. If omitted, existing files are not overwritten.| | _unicode_|Optional. **Boolean** value that indicates whether the file is created as a Unicode or ASCII file. The value is **True** if the file is created as a Unicode file; **False** if it's created as an ASCII file. If omitted, an ASCII file is assumed.| - **Remarks** +## Remarks + The following code illustrates how to use the **CreateTextFile** method to create and open a text file: If the _overwrite_ argument is **False**, or is not provided, for a _filename_ that already exists, an error occurs. diff --git a/Language/Reference/User-Interface-Help/createtoolwindow-method.md b/Language/Reference/User-Interface-Help/createtoolwindow-method.md index dfa61fda1fe..98706e69b39 100644 --- a/Language/Reference/User-Interface-Help/createtoolwindow-method.md +++ b/Language/Reference/User-Interface-Help/createtoolwindow-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Creates a new Tool window containing the indicated **UserDocument** object. - **Syntax** - _object_. **CreateToolWindow (**_AddInInst, ProgID, Caption, GuidPosition, DocObj_**) As Window** + +## Syntax + +_object_. **CreateToolWindow (**_AddInInst, ProgID, Caption, GuidPosition, DocObj_**) As Window** The **CreateToolWindow** method syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/curdir-function.md b/Language/Reference/User-Interface-Help/curdir-function.md index 3e5c0f21334..785a7955a9c 100644 --- a/Language/Reference/User-Interface-Help/curdir-function.md +++ b/Language/Reference/User-Interface-Help/curdir-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) representing the current path. - **Syntax** - **CurDir** [ **(**_drive_**)** ] + +## Syntax + +**CurDir** [ **(**_drive_**)** ] The optional _drive_[argument](../../Glossary/vbe-glossary.md) is a[string expression](../../Glossary/vbe-glossary.md) that specifies an existing drive. If no drive is specified or if _drive_ is a zero-length string (""), **CurDir** returns the path for the current drive. On the Macintosh, **CurDir** ignores any _drive_ specified and simply returns the path for the current drive. ## Example diff --git a/Language/Reference/User-Interface-Help/curline-property.md b/Language/Reference/User-Interface-Help/curline-property.md index 1c6339656c2..dc64f86c012 100644 --- a/Language/Reference/User-Interface-Help/curline-property.md +++ b/Language/Reference/User-Interface-Help/curline-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the current line of a control. - **Syntax** - _object_. **CurLine** [= _Long_ ] + +## Syntax + +_object_. **CurLine** [= _Long_ ] The **CurLine** property syntax has these parts: @@ -26,7 +28,8 @@ The **CurLine** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. Specifies the current line of a control.| - **Remarks** +## Remarks + The current line of a control is the line that contains the insertion point. The number of the first line is zero. The **CurLine** property is valid when the control has the[focus](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/curtargetx-property.md b/Language/Reference/User-Interface-Help/curtargetx-property.md index a68bbb77928..938dfcb35bc 100644 --- a/Language/Reference/User-Interface-Help/curtargetx-property.md +++ b/Language/Reference/User-Interface-Help/curtargetx-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Retrieves the preferred horizontal position of the insertion point in a multiline **TextBox** or **ComboBox**. - **Syntax** - _object_. **CurTargetX** + +## Syntax + +_object_. **CurTargetX** The **CurTargetX** property syntax has these parts: @@ -27,7 +29,9 @@ The **CurTargetX** property syntax has these parts: **Return Values** The **CurTargetX** property retrieves the preferred position, measured in himetric units. A himetric is 0.0001 meter. - **Remarks** + +## Remarks + The [target](../../../language/Glossary/glossary-vba.md) position is relative to the left edge of the control. If the length of a line is less than the value of the **CurTargetX** property, you can place the insertion point at the end of the the line. The value of **CurTargetX** changes when the user sets the insertion point or when the **CurX** property is set. **CurTargetX** is read-only. The return value is valid when the object has [focus](../../Glossary/vbe-glossary.md). You can use **CurTargetX** and **CurX** to move the insertion point as the user scrolls through the contents of a multiline **TextBox** or **ComboBox**. When the user moves the insertion point to another line of text by scrolling the content of the object, **CurTargetX** specifies the preferred position for the insertion point. **CurX** is set to this value if the line of text is longer than the value of **CurTargetX**. Otherwise, **CurX** is set to the end of the line of text. diff --git a/Language/Reference/User-Interface-Help/curx-property.md b/Language/Reference/User-Interface-Help/curx-property.md index a22a8e8b2dc..3f3e6b45740 100644 --- a/Language/Reference/User-Interface-Help/curx-property.md +++ b/Language/Reference/User-Interface-Help/curx-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the current horizontal position of the insertion point in a multiline **TextBox** or **ComboBox**. - **Syntax** - _object_. **CurX** [= _Long_ ] + +## Syntax + +_object_. **CurX** [= _Long_ ] The **CurX** property syntax has these parts: @@ -26,7 +28,8 @@ The **CurX** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. Indicates the current position, measured in himetrics. A himetric is 0.0001 meter.| - **Remarks** +## Remarks + The **CurX** property applies to a multiline **TextBox** or **ComboBox**. The return value is valid when the object has the[focus](../../Glossary/vbe-glossary.md). You can use **CurTargetX** and **CurX** to position the insertion point as the user scrolls through the contents of a multiline **TextBox** or **ComboBox**. When the user moves the insertion point to another line of text by scrolling the content of the object, **CurTargetX** specifies the preferred position for the insertion point. **CurX** is set to this value if the line of text is longer than the value of **CurTargetX**. Otherwise, **CurX** is set to the end of the line of text. diff --git a/Language/Reference/User-Interface-Help/cut-method-microsoft-forms.md b/Language/Reference/User-Interface-Help/cut-method-microsoft-forms.md index b7b31997134..0081f02d323 100644 --- a/Language/Reference/User-Interface-Help/cut-method-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/cut-method-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Removes selected information from an object and transfers it to the Clipboard. - **Syntax** - _object_. **Cut** + +## Syntax + +_object_. **Cut** The **Cut** method syntax has these parts: @@ -23,7 +25,8 @@ The **Cut** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + For a **ComboBox** or **TextBox**, the **Cut** method removes currently selected text in the control to the Clipboard. This method does not require that the control have the[focus](../../Glossary/vbe-glossary.md). On a **Page**, **Frame**, or form, **Cut** removes currently selected controls to the Clipboard. This method only removes controls created at[run time](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/cverr-function.md b/Language/Reference/User-Interface-Help/cverr-function.md index 79b69a4a462..90a87331c0c 100644 --- a/Language/Reference/User-Interface-Help/cverr-function.md +++ b/Language/Reference/User-Interface-Help/cverr-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a [Variant](../../Glossary/vbe-glossary.md) of subtype **Error** containing an[error number](../../Glossary/vbe-glossary.md) specified by the user. - **Syntax** - **CVErr(**_errornumber_**)** + +## Syntax + +**CVErr(**_errornumber_**)** The required _errornumber_[argument](../../Glossary/vbe-glossary.md) is any valid error number. - **Remarks** + +## Remarks + Use the **CVErr** function to create user-defined errors in user-created[procedures](../../Glossary/vbe-glossary.md). For example, if you create a function that accepts several arguments and normally returns a string, you can have your function evaluate the input arguments to ensure they are within acceptable range. If they are not, it is likely your function will not return what you expect. In this event, **CVErr** allows you to return an error number that tells you what action to take. Note that implicit conversion of an **Error** is not allowed. For example, you can't directly assign the return value of **CVErr** to a[variable](../../Glossary/vbe-glossary.md) that is not a **Variant**. However, you can perform an explicit conversion (using **CInt**, **CDbl**, and so on) of the value returned by **CVErr** and assign that to a variable of the appropriate[data type](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/cycle-property.md b/Language/Reference/User-Interface-Help/cycle-property.md index cfa27e733fa..cf223e0ce56 100644 --- a/Language/Reference/User-Interface-Help/cycle-property.md +++ b/Language/Reference/User-Interface-Help/cycle-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the action to take when the user leaves the last control on a **Frame** or **Page**. - **Syntax** - _object_. **Cycle** [= _fmCycle_ ] + +## Syntax + +_object_. **Cycle** [= _fmCycle_ ] The **Cycle** property syntax has these parts: @@ -36,7 +38,9 @@ The settings for _fmCycle_ are: | _fmCycleCurrentForm_|2|Cycles through the controls on the form, **Frame**, or **MultiPage**. The focus stays within the form, **Frame**, or **MultiPage** until the focus is explicitly set to a control outside the form, **Frame**, or **MultiPage**.| If you specify a non-integer value for **Cycle**, the value is rounded up to the nearest integer. - **Remarks** + +## Remarks + The [tab order](../../Glossary/vbe-glossary.md) identifies the order in which controls receive the[focus](../../Glossary/vbe-glossary.md) as the user tabs through a form or subform. The **Cycle** property determines the action to take when a user tabs from the last control in the tab order. The **fmCycleAllForms** setting transfers the focus to the the first control of the next **Frame** or **MultiPage** on the form when the user tabs from the last control in the tab order. The **fmCycleCurrentForm** setting transfers the focus to the the first control of the same form, **Frame**, or **MultiPage** when the user tabs from the last control in the tab order. diff --git a/Language/Reference/User-Interface-Help/dataobject-object.md b/Language/Reference/User-Interface-Help/dataobject-object.md index 7681e9e4686..f8b5fe42a0a 100644 --- a/Language/Reference/User-Interface-Help/dataobject-object.md +++ b/Language/Reference/User-Interface-Help/dataobject-object.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 A holding area for formatted text data used in transfer operations. Also holds a list of [formats](../../../language/Glossary/glossary-vba.md) corresponding to the pieces of text stored in the **DataObject**. - **Remarks** + +## Remarks + A **DataObject** can contain one piece of text for the Clipboard text format, and one piece of text for each additional text format, such as custom and user-defined formats. A **DataObject** is distinct from the Clipboard. A **DataObject** supports commands that involve the Clipboard and drag-and-drop actions for text. When you start an operation involving the Clipboard (such as **GetText**) or a drag-and-drop operation, the data involved in that operation is moved to a **DataObject**. The **DataObject** works like the Clipboard. If you copy a text string to a **DataObject**, the **DataObject** stores the text string. If you copy a second string of the same format to the **DataObject**, the **DataObject** discards the first text string and stores a copy of the second string. It stores one piece of text of a specified format and keeps the text from the most recent operation. diff --git a/Language/Reference/User-Interface-Help/date-function.md b/Language/Reference/User-Interface-Help/date-function.md index 9d4adb5624a..70e86e1e15f 100644 --- a/Language/Reference/User-Interface-Help/date-function.md +++ b/Language/Reference/User-Interface-Help/date-function.md @@ -14,9 +14,13 @@ ms.date: 06/08/2017 Returns a **Variant** (**Date**) containing the current system date. - **Syntax** - **Date** - **Remarks** + +## Syntax + +**Date** + +## Remarks + To set the system date, use the **Date** statement. **Date**, and if the calendar is Gregorian, **Date$** behavior is unchanged by the **Calendar** property setting. If the calendar is Hijri, **Date$** returns a 10-character string of the form _mm-dd-yyyy_, where _mm_ (01-12), _dd_ (01-30) and _yyyy_ (1400-1523) are the Hijri month, day and year. The equivalent Gregorian range is Jan 1, 1980 through Dec 31, 2099. diff --git a/Language/Reference/User-Interface-Help/date-statement.md b/Language/Reference/User-Interface-Help/date-statement.md index 2e3b52a8115..33d766affc1 100644 --- a/Language/Reference/User-Interface-Help/date-statement.md +++ b/Language/Reference/User-Interface-Help/date-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Sets the current system date. - **Syntax** +## Syntax - **Date** **=**_date_ +**Date** **=**_date_ For systems running Microsoft Windows 95, the required _date_ specification must be a date from January 1, 1980 through December 31, 2099. For systems running Microsoft Windows NT, _date_ must be a date from January 1, 1980 through December 31, 2079. For the Macintosh, _date_ must be a date from January 1, 1904 through February 5, 2040. diff --git a/Language/Reference/User-Interface-Help/dateadd-function.md b/Language/Reference/User-Interface-Help/dateadd-function.md index d0f9cad438a..2cdc2737173 100644 --- a/Language/Reference/User-Interface-Help/dateadd-function.md +++ b/Language/Reference/User-Interface-Help/dateadd-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Date**) containing a date to which a specified time interval has been added. - **Syntax** - **DateAdd( _interval, number, date_ )** + +## Syntax + +**DateAdd( _interval, number, date_ )** The **DateAdd** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -42,7 +44,8 @@ The **_interval_**[argument](../../Glossary/vbe-glossary.md) has these settings |n|Minute| |s|Second| - **Remarks** +## Remarks + You can use the **DateAdd** function to add or subtract a specified time interval from a date. For example, you can use **DateAdd** to calculate a date 30 days from today or a time 45 minutes from now. To add days to **_date_**, you can use Day of Year ("y"), Day ("d"), or Weekday ("w"). diff --git a/Language/Reference/User-Interface-Help/datecreated-property.md b/Language/Reference/User-Interface-Help/datecreated-property.md index dc25416f97b..7cbf2b7d514 100644 --- a/Language/Reference/User-Interface-Help/datecreated-property.md +++ b/Language/Reference/User-Interface-Help/datecreated-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the date and time that the specified file or folder was created. Read-only. - **Syntax** - _object_. **DateCreated** + +## Syntax + +_object_. **DateCreated** The _object_ is always a **File** or **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **DateCreated** property with a file: diff --git a/Language/Reference/User-Interface-Help/datediff-function.md b/Language/Reference/User-Interface-Help/datediff-function.md index bde6daadbea..255b160c991 100644 --- a/Language/Reference/User-Interface-Help/datediff-function.md +++ b/Language/Reference/User-Interface-Help/datediff-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Long**) specifying the number of time intervals between two specified dates. - **Syntax** - **DateDiff( _interval, date1, date2_** [ **_, firstdayofweek_** [ **,** **_firstweekofyear_** ]] **)** + +## Syntax + +**DateDiff( _interval, date1, date2_** [ **_, firstdayofweek_** [ **,** **_firstweekofyear_** ]] **)** The **DateDiff** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -65,7 +67,8 @@ The **_firstdayofweek_** argument has these settings: |**vbFirstFourDays**|2|Start with the first week that has at least four days in the new year.| |**vbFirstFullWeek**|3|Start with first full week of the year.| - **Remarks** +## Remarks + You can use the **DateDiff** function to determine how many specified time intervals exist between two dates. For example, you might use **DateDiff** to calculate the number of days between two dates, or the number of weeks between today and the end of the year. To calculate the number of days between **_date1_** and **_date2_**, you can use either Day of year ("y") or Day ("d"). When **_interval_** is Weekday ("w"), **DateDiff** returns the number of weeks between the two dates. If **_date1_** falls on a Monday, **DateDiff** counts the number of Mondays until **_date2_**. It counts **_date2_** but not **_date1_**. If **_interval_** is Week ("ww"), however, the **DateDiff** function returns the number of calendar weeks between the two dates. It counts the number of Sundays between **_date1_** and **_date2_**. **DateDiff** counts **_date2_** if it falls on a Sunday; but it doesn't count **_date1_**, even if it does fall on a Sunday. If **_date1_** refers to a later point in time than **_date2_**, the **DateDiff** function returns a negative number. diff --git a/Language/Reference/User-Interface-Help/datelastaccessed-property.md b/Language/Reference/User-Interface-Help/datelastaccessed-property.md index 2934023b547..8b3bf56edbc 100644 --- a/Language/Reference/User-Interface-Help/datelastaccessed-property.md +++ b/Language/Reference/User-Interface-Help/datelastaccessed-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the date and time that the specified file or folder was last accessed. Read-only. - **Syntax** - _object_. **DateLastAccessed** + +## Syntax + +_object_. **DateLastAccessed** The _object_ is always a **File** or **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **DateLastAccessed** property with a file: diff --git a/Language/Reference/User-Interface-Help/datelastmodified-property.md b/Language/Reference/User-Interface-Help/datelastmodified-property.md index 9b785ac9abe..029a05b207d 100644 --- a/Language/Reference/User-Interface-Help/datelastmodified-property.md +++ b/Language/Reference/User-Interface-Help/datelastmodified-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the date and time that the specified file or folder was last modified. Read-only. - **Syntax** - _object_. **DateLastModified** + +## Syntax + +_object_. **DateLastModified** The _object_ is always a **File** or **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **DateLastModified** property with a file: diff --git a/Language/Reference/User-Interface-Help/datepart-function.md b/Language/Reference/User-Interface-Help/datepart-function.md index 87772afcaf0..47034381db5 100644 --- a/Language/Reference/User-Interface-Help/datepart-function.md +++ b/Language/Reference/User-Interface-Help/datepart-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Integer**) containing the specified part of a given date. - **Syntax** - **DatePart( _interval,_** **_date_** [ **_,firstdayofweek_** [ **_,_** **_firstweekofyear_** ]] **)** + +## Syntax + +**DatePart( _interval,_** **_date_** [ **_,firstdayofweek_** [ **_,_** **_firstweekofyear_** ]] **)** The **DatePart** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -67,7 +69,8 @@ The **_firstweekofyear_** argument has these settings: |**vbFirstFourDays**|2|Start with the first week that has at least four days in the new year.| |**vbFirstFullWeek**|3|Start with first full week of the year.| - **Remarks** +## Remarks + You can use the **DatePart** function to evaluate a date and return a specific interval of time. For example, you might use **DatePart** to calculate the day of the week or the current hour. The **_firstdayofweek_** argument affects calculations that use the "w" and "ww" interval symbols. If _date_ is a[date literal](../../Glossary/vbe-glossary.md), the specified year becomes a permanent part of that date. However, if _date_ is enclosed in double quotation marks (" "), and you omit the year, the current year is inserted in your code each time the _date_ expression is evaluated. This makes it possible to write code that can be used in different years. diff --git a/Language/Reference/User-Interface-Help/dateserial-function.md b/Language/Reference/User-Interface-Help/dateserial-function.md index 37f9c7531a6..499bcac9af2 100644 --- a/Language/Reference/User-Interface-Help/dateserial-function.md +++ b/Language/Reference/User-Interface-Help/dateserial-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Date**) for a specified year, month, and day. - **Syntax** - **DateSerial( _year_, _month_, _day_ )** + +## Syntax + +**DateSerial( _year_, _month_, _day_ )** The **DateSerial** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,7 +27,8 @@ The **DateSerial** function syntax has these[named arguments](../../Glossary/vb |**_month_**|Required; **Integer**. Any numeric expression.| |**_day_**|Required; **Integer**. Any numeric expression.| - **Remarks** +## Remarks + To specify a date, such as December 31, 1991, the range of numbers for each **DateSerial**[argument](../../Glossary/vbe-glossary.md) should be in the accepted range for the unit; that is, 1-31 for days and 1-12 for months. However, you can also specify relative dates for each argument using any numeric expression that represents some number of days, months, or years before or after a certain date. The following example uses numeric expressions instead of absolute date numbers. Here the **DateSerial** function returns a date that is the day before the first day ( `1 - 1`), two months before August ( `8 - 2`), 10 years before 1990 (), two months before August ( `8 - 2`), 10 years before 1990 ( `1990 - 10`); in other words, May 31, 1980. Under Windows 98 or Windows 2000, two digit years for the **_year_** argument are interpreted based on user-defined machine settings. The default settings are that values between 0 and 29, inclusive, are interpreted as the years 2000-2029. The default values between 30 and 99 are interpreted as the years 1930-1999. For all other **_year_** arguments, use a four-digit year (for example, 1800). diff --git a/Language/Reference/User-Interface-Help/datevalue-function.md b/Language/Reference/User-Interface-Help/datevalue-function.md index a612b83aeea..b31bca90896 100644 --- a/Language/Reference/User-Interface-Help/datevalue-function.md +++ b/Language/Reference/User-Interface-Help/datevalue-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Variant** (**Date**). - **Syntax** - **DateValue(**_date_**)** + +## Syntax + +**DateValue(**_date_**)** The required _date_[argument](../../Glossary/vbe-glossary.md) is normally a[string expression](../../Glossary/vbe-glossary.md) representing a date from January 1, 100 through December 31, 9999. However, _date_ can also be any[expression](../../Glossary/vbe-glossary.md) that can represent a date, a time, or both a date and time, in that range. - **Remarks** + +## Remarks + If _date_ is a string that includes only numbers separated by valid[date separators](../../Glossary/vbe-glossary.md), **DateValue** recognizes the order for month, day, and year according to the Short Date format you specified for your system. **DateValue** also recognizes unambiguous dates that contain month names, either in long or abbreviated form. For example, in addition to recognizing 12/30/1991 and 12/30/91, **DateValue** also recognizes December 30, 1991 and Dec 30, 1991. If the year part of _date_ is omitted, **DateValue** uses the current year from your computer's system date. If the _date_ argument includes time information, **DateValue** doesn't return it. However, if _date_ includes invalid time information (such as "89:98"), an error occurs. diff --git a/Language/Reference/User-Interface-Help/day-function.md b/Language/Reference/User-Interface-Help/day-function.md index 7b4d2326139..b3a2049c247 100644 --- a/Language/Reference/User-Interface-Help/day-function.md +++ b/Language/Reference/User-Interface-Help/day-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Integer**) specifying a whole number between 1 and 31, inclusive, representing the day of the month. - **Syntax** - **Day(**_date_**)** + +## Syntax + +**Day(**_date_**)** The required _date_[argument](../../Glossary/vbe-glossary.md) is any[Variant](../../Glossary/vbe-glossary.md), [numeric expression](../../Glossary/vbe-glossary.md), [string expression](../../Glossary/vbe-glossary.md), or any combination, that can represent a date. If _date_ contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned. **Note** If the **Calendar** property setting is Gregorian, the returned integer represents the Gregorian day of the month for the date argument. If the calendar is Hijri, the returned integer represents the Hijri day of the month for the date argument. diff --git a/Language/Reference/User-Interface-Help/dblclick-event.md b/Language/Reference/User-Interface-Help/dblclick-event.md index 980df713b25..5357035fb89 100644 --- a/Language/Reference/User-Interface-Help/dblclick-event.md +++ b/Language/Reference/User-Interface-Help/dblclick-event.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Occurs when the user points to an object and then clicks a mouse button twice. - **Syntax** + +## Syntax + For MultiPage, TabStrip **Private Sub**_object_ _**DblClick(**_index_**As Long**, **ByVal**_Cancel_**As MSForms.ReturnBoolean)** For other controls **Private Sub**_object_ _**DblClick( ByVal**_Cancel_**As MSForms.ReturnBoolean)** The **DblClick** event syntax has these parts: @@ -28,7 +30,8 @@ The **DblClick** event syntax has these parts: | _index_|Required. The position of a **Page** or **Tab** object within a **Pages** or **Tabs** collection.| | _Cancel_|Required. Event status. **False** indicates that the control should handle the event (default). **True** indicates the application handles the event.| - **Remarks** +## Remarks + For this event to occur, the two clicks must occur within the time span specified by the system's double-click speed setting. For controls that support Click, the following sequence of events leads to the DblClick event: diff --git a/Language/Reference/User-Interface-Help/ddb-function.md b/Language/Reference/User-Interface-Help/ddb-function.md index 63cadf50b18..f88be167187 100644 --- a/Language/Reference/User-Interface-Help/ddb-function.md +++ b/Language/Reference/User-Interface-Help/ddb-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the depreciation of an asset for a specific time period using the double-declining balance method or some other method you specify. - **Syntax** - **DDB( _cost_,** **_salvage_**, **_life_**, **_period_** [, **_factor_** ] **)** + +## Syntax + +**DDB( _cost_,** **_salvage_**, **_life_**, **_period_** [, **_factor_** ] **)** The **DDB** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -27,7 +29,8 @@ The **DDB** function has these[named arguments](../../Glossary/vbe-glossary.md) |**_period_**|Required. **Double** specifying period for which asset depreciation is calculated.| |**_factor_**|Optional. [Variant](../../Glossary/vbe-glossary.md) specifying rate at which the balance declines. If omitted, 2 (double-declining method) is assumed.| - **Remarks** +## Remarks + The double-declining balance method computes depreciation at an accelerated rate. Depreciation is highest in the first period and decreases in successive periods. The **_life_** and **_period_**[arguments](../../Glossary/vbe-glossary.md) must be expressed in the same units. For example, if **_life_** is given in months, **_period_** must also be given in months. All arguments must be positive numbers. The **DDB** function uses the following formula to calculate depreciation for a given period: diff --git a/Language/Reference/User-Interface-Help/declare-statement.md b/Language/Reference/User-Interface-Help/declare-statement.md index a6229975614..86ca7817c77 100644 --- a/Language/Reference/User-Interface-Help/declare-statement.md +++ b/Language/Reference/User-Interface-Help/declare-statement.md @@ -68,7 +68,8 @@ The _arglist_ argument has the following syntax and parts: |**( )**|Required for array variables. Indicates that _varname_ is an array.| | _type_|Optional. Data type of the argument passed to the procedure; may be **Byte**, **Boolean**, **Integer**, **Long**, **LongLong**, **LongPtr**, **Currency**, **Single**, **Double**, **Decimal** (not currently supported), **Date**, **String** (variable length only), **Object**, **Variant**, a user-defined type, or an object type. (**LongLong** is a valid declared type only on 64-bit platforms.)| - **Remarks** +## Remarks + For **Function** procedures, the data type of the procedure determines the data type it returns. You can use an **As** clause following _arglist_ to specify the return type of the function. Within _arglist_, you can use an **As** clause to specify the data type of any of the arguments passed to the procedure. In addition to specifying any of the standard data types, you can specify **As Any** in _arglist_ to inhibit type checking and allow any data type to be passed to the procedure. Empty parentheses indicate that the **Sub** or **Function** procedure has no arguments and that Visual Basic should ensure that none are passed. In the following example, `First` takes no arguments. If you use arguments in a call to takes no arguments. If you use arguments in a call to `First`, an error occurs: diff --git a/Language/Reference/User-Interface-Help/default-propertyd-microsoft-forms.md b/Language/Reference/User-Interface-Help/default-propertyd-microsoft-forms.md index 150e03a8fdb..ff343c2ea8c 100644 --- a/Language/Reference/User-Interface-Help/default-propertyd-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/default-propertyd-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Designates the default command button on a form. - **Syntax** - _object_. **Default** [= _Boolean_ ] + +## Syntax + +_object_. **Default** [= _Boolean_ ] The **Default** property syntax has these parts: @@ -33,7 +35,8 @@ The settings for _Boolean_ are: |**True**|The **CommandButton** is the default button.| |**False**|The **CommandButton** is not the default button (default).| - **Remarks** +## Remarks + A **CommandButton** or an object that acts like a command button can be designated as the default command button. Only one object on a form can be the default command button. Setting the **Default** property to **True** for one object automatically sets it to **False** for all other objects on the form. To choose the default command button on an active form, the user can click the button, or press ENTER when no other **CommandButton** has the[focus](../../Glossary/vbe-glossary.md). Pressing ENTER when no other **CommandButton** has the focus also initiates the KeyUp event for the default command button. **Default** is provided for[OLE container controls](../../../language/Glossary/glossary-vba.md) (Windows only) that specifically act like **CommandButton** controls. diff --git a/Language/Reference/User-Interface-Help/delay-property.md b/Language/Reference/User-Interface-Help/delay-property.md index fb6005e9912..21a63d6a8c2 100644 --- a/Language/Reference/User-Interface-Help/delay-property.md +++ b/Language/Reference/User-Interface-Help/delay-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the delay for the SpinUp, SpinDown, and Change events on a **SpinButton** or **ScrollBar**. - **Syntax** - _object_. **Delay** [= _Long_ ] + +## Syntax + +_object_. **Delay** [= _Long_ ] The **Delay** property syntax has these parts: @@ -26,7 +28,8 @@ The **Delay** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. The delay, in milliseconds, between events.| - **Remarks** +## Remarks + The **Delay** property affects the amount of time between consecutive SpinUp, SpinDown, and Change events generated when the user clicks and holds down a button on a **SpinButton** or **ScrollBar**. The first event occurs immediately. The delay to the second occurrence of the event is five times the value of the specified **Delay**. This initial lag makes it easy to generate a single event rather than a stream of events. After the initial lag, the interval between events is the value specified for **Delay**. The default value of **Delay** is 50 milliseconds. This means the object initiates the first event after 250 milliseconds (5 times the specified value) and initiates each subsequent event after 50 milliseconds. diff --git a/Language/Reference/User-Interface-Help/delete-method-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/delete-method-visual-basic-for-applications.md index 720b595feba..f3058fd98a1 100644 --- a/Language/Reference/User-Interface-Help/delete-method-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/delete-method-visual-basic-for-applications.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Deletes a specified file or folder. - **Syntax** - _object_. **Delete**_force_ + +## Syntax + +_object_. **Delete**_force_ The **Delete** method syntax has these parts: @@ -25,7 +27,8 @@ The **Delete** method syntax has these parts: | _object_|Required. Always the name of a **File** or **Folder** object.| | _force_|Optional. **Boolean** value that is **True** if files or folders with the read-only attribute set are to be deleted; **False** (default) if they are not.| - **Remarks** +## Remarks + An error occurs if the specified file or folder does not exist. The results of the **Delete** method on a **File** or **Folder** are identical to operations performed using **FileSystemObject.DeleteFile** or **FileSystemObject.DeleteFolder**. The **Delete** method does not distinguish between folders that have contents and those that do not. The specified folder is deleted regardless of whether or not it has contents. diff --git a/Language/Reference/User-Interface-Help/deletefile-method.md b/Language/Reference/User-Interface-Help/deletefile-method.md index ee243567a36..3a06552ada0 100644 --- a/Language/Reference/User-Interface-Help/deletefile-method.md +++ b/Language/Reference/User-Interface-Help/deletefile-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Deletes a specified file. - **Syntax** - _object_. **DeleteFile**_filespec_ [, _force_ ] + +## Syntax + +_object_. **DeleteFile**_filespec_ [, _force_ ] The **DeleteFile** method syntax has these parts: @@ -28,6 +30,7 @@ The **DeleteFile** method syntax has these parts: | _filespec_|Required. The name of the file to delete. The _filespec_ can contain wildcard characters in the last path component.| | _force_|Optional. **Boolean** value that is **True** if files with the read-only attribute set are to be deleted; **False** (default) if they are not.| - **Remarks** +## Remarks + An error occurs if no matching files are found. The **DeleteFile** method stops on the first error it encounters. No attempt is made to roll back or undo any changes that were made before an error occurred. diff --git a/Language/Reference/User-Interface-Help/deletefolder-method.md b/Language/Reference/User-Interface-Help/deletefolder-method.md index 4d834762f21..8e7c36e1034 100644 --- a/Language/Reference/User-Interface-Help/deletefolder-method.md +++ b/Language/Reference/User-Interface-Help/deletefolder-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Deletes a specified folder and its contents. - **Syntax** - _object_. **DeleteFolder**_folderspec_ [, _force_ ] + +## Syntax + +_object_. **DeleteFolder**_folderspec_ [, _force_ ] The **DeleteFolder** method syntax has these parts: @@ -28,7 +30,8 @@ The **DeleteFolder** method syntax has these parts: | _folderspec_|Required. The name of the folder to delete. The _folderspec_ can contain wildcard characters in the last path component.| | _force_|Optional. **Boolean** value that is **True** if folders with the read-only attribute set are to be deleted; **False** (default) if they are not.| - **Remarks** +## Remarks + The **DeleteFolder** method does not distinguish between folders that have contents and those that do not. The specified folder is deleted regardless of whether or not it has contents. An error occurs if no matching folders are found. The **DeleteFolder** method stops on the first error it encounters. No attempt is made to roll back or undo any changes that were made before an error occurred. diff --git a/Language/Reference/User-Interface-Help/deletelines-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/deletelines-method-vba-add-in-object-model.md index f28ce2f2dc8..9400e39d68a 100644 --- a/Language/Reference/User-Interface-Help/deletelines-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/deletelines-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Deletes a single line or a specified range of lines. - **Syntax** - _object_**.DeleteLines (**_startline_ [, _count_ ] **)** + +## Syntax + +_object_**.DeleteLines (**_startline_ [, _count_ ] **)** The **DeleteLines** syntax has these parts: @@ -25,6 +27,7 @@ The **DeleteLines** syntax has these parts: | _startline_|Required. A [Long](../../Glossary/vbe-glossary.md) specifying the first line you want to delete.| | _count_|Optional. A **Long** specifying the number of lines you want to delete.| - **Remarks** +## Remarks + If you don't specify how many lines you want to delete, **DeleteLines** deletes one line. diff --git a/Language/Reference/User-Interface-Help/deletesetting-statement.md b/Language/Reference/User-Interface-Help/deletesetting-statement.md index 4d852c1a56f..b6c5131d658 100644 --- a/Language/Reference/User-Interface-Help/deletesetting-statement.md +++ b/Language/Reference/User-Interface-Help/deletesetting-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Deletes a section or key setting from an application's entry in the Windows [registry](../../Glossary/vbe-glossary.md) or (on the Macintosh) information in the application's initialization file. - **Syntax** +## Syntax - **DeleteSetting _appname_,** **_section_** [ **,** **_key_** ] +**DeleteSetting _appname_,** **_section_** [ **,** **_key_** ] The **DeleteSetting** statement syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -26,7 +26,8 @@ The **DeleteSetting** statement syntax has these[named arguments](../../Glossar |**_section_**|Required. String expression containing the name of the section where the key setting is being deleted. If only **_appname_** and **_section_** are provided, the specified section is deleted along with all related key settings.| |**_key_**|Optional. String expression containing the name of the key setting being deleted.| - **Remarks** +## Remarks + If all [arguments](../../Glossary/vbe-glossary.md) are provided, the specified setting is deleted. A run-time error occurs if you attempt to use the **DeleteSetting** statement on a non-existent section or key setting. ## Example diff --git a/Language/Reference/User-Interface-Help/description-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/description-property-vba-add-in-object-model.md index 8cb36610613..cf77eba2b93 100644 --- a/Language/Reference/User-Interface-Help/description-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/description-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a [string expression](../../Glossary/vbe-glossary.md) containing a descriptive string associated with an object. For the **VBProject** object, read/write; for the **Reference** object, read-only. - **Remarks** + +## Remarks + For the **VBProject** object, the **Description** property returns or sets a descriptive string associated with the active[project](../../Glossary/vbe-glossary.md). For the **Reference** object, the **Description** property returns the descriptive name of the reference. diff --git a/Language/Reference/User-Interface-Help/description-property-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/description-property-visual-basic-for-applications.md index e0548019ae9..8038b41c209 100644 --- a/Language/Reference/User-Interface-Help/description-property-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/description-property-visual-basic-for-applications.md @@ -15,7 +15,9 @@ ms.date: 06/08/2017 Returns or sets a [string expression](../../Glossary/vbe-glossary.md) containing a descriptive string associated with an object. Read/write. For the **Err** object, returns or sets a descriptive string associated with an error. - **Remarks** + +## Remarks + The **Description** property setting consists of a short description of the error. Use this[property](../../Glossary/vbe-glossary.md) to alert the user to an error that you either can't or don't want to handle. When generating a user-defined error, assign a short description of your error to the **Description** property. If **Description** isn't filled in, and the value of **Number** corresponds to a Visual Basic[run-time error](../../Glossary/vbe-glossary.md), the string returned by the **Error** function is placed in **Description** when the error is generated. ## Example diff --git a/Language/Reference/User-Interface-Help/designer-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/designer-property-vba-add-in-object-model.md index 990f3f2726a..76e48069866 100644 --- a/Language/Reference/User-Interface-Help/designer-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/designer-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns the object that enables you to access the design characteristics of a component. - **Remarks** + +## Remarks + If the object has an open [designer](../../Glossary/vbe-glossary.md), the **Designer** property returns the open designer; otherwise a new designer is created. The designer is a characteristic of certain **VBComponent** objects. For example, when you create certain types of **VBComponent** object, a designer is created along with the object. A component can have only one designer, and it's always the same designer. The **Designer** property enables you to access a component-specific object. In some cases, such as in[standard modules](../../Glossary/vbe-glossary.md) and[class modules](../../Glossary/vbe-glossary.md), a designer isn't created because that type of **VBComponent** object doesn't support a designer. The **Designer** property returns **Nothing** if the **VBComponent** object doesn't have a designer. diff --git a/Language/Reference/User-Interface-Help/designerwindow-method.md b/Language/Reference/User-Interface-Help/designerwindow-method.md index 3af26b1719d..1f8097b0413 100644 --- a/Language/Reference/User-Interface-Help/designerwindow-method.md +++ b/Language/Reference/User-Interface-Help/designerwindow-method.md @@ -16,9 +16,13 @@ ms.date: 06/08/2017 Returns the **Window** object that represents the component's[designer](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.DesignerWindow** + +## Syntax + +_object_**.DesignerWindow** The _object_ placeholder is an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + If the component supports a designer but doesn't have an open designer, using the **DesignerWindow** method creates the designer, but it isn't visible. To make the window visible, set the **Window** object's **Visible** property to **True**. diff --git a/Language/Reference/User-Interface-Help/dictionary-object.md b/Language/Reference/User-Interface-Help/dictionary-object.md index ebad4ef8e88..d2da4c3700a 100644 --- a/Language/Reference/User-Interface-Help/dictionary-object.md +++ b/Language/Reference/User-Interface-Help/dictionary-object.md @@ -17,9 +17,13 @@ ms.date: 06/08/2017 **Description** Object that stores data key, item pairs. - **Syntax** - **Scripting.Dictionary** - **Remarks** + +## Syntax + +**Scripting.Dictionary** + +## Remarks + A **Dictionary** object is the equivalent of a PERL associative array. Items, which can be any form of data, are stored in the array. Each item is associated with a unique key. The key is used to retrieve an individual item and is usually a integer or a string, but can be anything except an array. The following code illustrates how to create a **Dictionary** object: diff --git a/Language/Reference/User-Interface-Help/dim-statement.md b/Language/Reference/User-Interface-Help/dim-statement.md index 4b5a50e52d3..c9c3811b940 100644 --- a/Language/Reference/User-Interface-Help/dim-statement.md +++ b/Language/Reference/User-Interface-Help/dim-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Declares [variables](../../Glossary/vbe-glossary.md) and allocates storage space. - **Syntax** +## Syntax - **Dim** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ] [ **,** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ]] **. . .** +**Dim** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ] [ **,** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ]] **. . .** The **Dim** statement syntax has these parts: @@ -28,7 +28,8 @@ The **Dim** statement syntax has these parts: |**New**|Optional. Keyword that enables implicit creation of an object. If you use **New** when declaring the object variable, a new instance of the object is created on first reference to it, so you don't have to use the **Set** statement to assign the object reference. The **New** keyword can't be used to declare variables of any intrinsic[data type](../../Glossary/vbe-glossary.md), can't be used to declare instances of dependent objects, and can't be used with **WithEvents**.| | _type_|Optional. Data type of the variable; may be [Byte](../../Glossary/vbe-glossary.md), [Boolean](../../Glossary/vbe-glossary.md), [Integer](../../Glossary/vbe-glossary.md), [Long](../../Glossary/vbe-glossary.md), [Currency](../../Glossary/vbe-glossary.md), [Single](../../Glossary/vbe-glossary.md), [Double](../../Glossary/vbe-glossary.md), [Decimal](../../Glossary/vbe-glossary.md) (not currently supported),[Date](../../Glossary/vbe-glossary.md), [String](../../Glossary/vbe-glossary.md) (for variable-length strings), **String** * _length_ (for fixed-length strings),[Object](../../Glossary/vbe-glossary.md), [Variant](../../Glossary/vbe-glossary.md), a [user-defined type](../../Glossary/vbe-glossary.md), or an [object type](../../Glossary/vbe-glossary.md). Use a separate **As**_type_ clause for each variable you declare.| - **Remarks** +## Remarks + Variables declared with **Dim** at the[module level](../../Glossary/vbe-glossary.md) are available to all procedures within the[module](../../Glossary/vbe-glossary.md). At the [procedure level](../../Glossary/vbe-glossary.md), variables are available only within the procedure. Use the **Dim** statement at module or procedure level to declare the data type of a variable. For example, the following statement declares a variable as an **Integer**. diff --git a/Language/Reference/User-Interface-Help/dir-function.md b/Language/Reference/User-Interface-Help/dir-function.md index 41b3360fbe8..2ea3b9a5436 100644 --- a/Language/Reference/User-Interface-Help/dir-function.md +++ b/Language/Reference/User-Interface-Help/dir-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **String** representing the name of a file, directory, or folder that matches a specified pattern or file attribute, or the volume label of a drive. - **Syntax** - **Dir** [ **(**_pathname_ [ **,**_attributes_ ] **)** ] + +## Syntax + +**Dir** [ **(**_pathname_ [ **,**_attributes_ ] **)** ] The **Dir** function syntax has these parts: @@ -40,7 +42,8 @@ The _attributes_[argument](../../Glossary/vbe-glossary.md) settings are: **Note** These constants are specified by Visual Basic for Applications and can be used anywhere in your code in place of the actual values. - **Remarks** +## Remarks + In Microsoft Windows, **Dir** supports the use of multiple character (**\***) and single character (**?**) wildcards to specify multiple files. On the Macintosh, these characters are treated as valid file name characters and can't be used as wildcards to specify multiple files. Since the Macintosh doesn't support the wildcards, use the file type to identify groups of files. You can use the **MacID** function to specify file type instead of using the file names. For example, the following statement returns the name of the first TEXT file in the current folder: diff --git a/Language/Reference/User-Interface-Help/doevents-function.md b/Language/Reference/User-Interface-Help/doevents-function.md index a8fd594cd89..b70799b29f3 100644 --- a/Language/Reference/User-Interface-Help/doevents-function.md +++ b/Language/Reference/User-Interface-Help/doevents-function.md @@ -14,9 +14,13 @@ ms.date: 06/08/2017 Yields execution so that the operating system can process other events. - **Syntax** - **DoEvents(** **)** - **Remarks** + +## Syntax + +**DoEvents(** **)** + +## Remarks + The **DoEvents** function returns an[Integer](../../Glossary/vbe-glossary.md) representing the number of open forms in stand-alone versions of Visual Basic, such as Visual Basic, Professional Edition. **DoEvents** returns zero in all other applications. **DoEvents** passes control to the operating system. Control is returned after the operating system has finished processing the events in its queue and all keys in the **SendKeys** queue have been sent. **DoEvents** is most useful for simple things like allowing a user to cancel a process after it has started, for example a search for a file. For long-running processes, yielding the processor is better accomplished by using a Timer or delegating the task to an ActiveX EXE component. In the latter case, the task can continue completely independent of your application, and the operating system takes care of multitasking and time slicing. diff --git a/Language/Reference/User-Interface-Help/doloop-statement.md b/Language/Reference/User-Interface-Help/doloop-statement.md index 4968eca0d85..3e4dd804789 100644 --- a/Language/Reference/User-Interface-Help/doloop-statement.md +++ b/Language/Reference/User-Interface-Help/doloop-statement.md @@ -19,7 +19,7 @@ Repeats a block of [statements](../../Glossary/vbe-glossary.md) while a conditio [ _statements_ ]
[ **Exit Do** ]
[ _statements_ ]
-**Loop** +**Loop** Or, you can use this syntax: @@ -36,10 +36,23 @@ The **Do Loop** statement syntax has these parts: | _condition_|Optional. [Numeric expression](../../Glossary/vbe-glossary.md) or [string expression](../../Glossary/vbe-glossary.md) that is **True** or **False**. If _condition_ is [Null](../../Glossary/vbe-glossary.md), _condition_ is treated as **False**.| | _statements_|One or more statements that are repeated while, or until, _condition_ is **True**.| +<<<<<<< HEAD +<<<<<<< HEAD +## Remarks + +Any number of **Exit Do** statements may be placed anywhere in the **Do…Loop** as an alternate way to exit a **Do…Loop**. **Exit Do** is often used after evaluating some condition, for example, **If…Then**, in which case the **Exit Do** statement transfers control to the statement immediately following the **Loop**. +When used within nested **Do…Loop** statements, **Exit Do** transfers control to the loop that is one nested level above the loop where **Exit Do** occurs. +======= +======= +>>>>>>> 82078e8a3dfa3297e97a0200b8bf1d59766c0039 ## Remarks Any number of **Exit Do** statements may be placed anywhere in the **Do…Loop** as an alternate way to exit a **Do…Loop**. **Exit Do** is often used after evaluating some condition, for example, **If…Then**, in which case the **Exit Do** statement transfers control to the statement immediately following the **Loop**. When used within nested **Do…Loop** statements, **Exit Do** transfers control to the loop that is one nested level above the loop where **Exit Do** occurs. +<<<<<<< HEAD +>>>>>>> 82078e8a3dfa3297e97a0200b8bf1d59766c0039 +======= +>>>>>>> 82078e8a3dfa3297e97a0200b8bf1d59766c0039 ## Example diff --git a/Language/Reference/User-Interface-Help/dragbehavior-property.md b/Language/Reference/User-Interface-Help/dragbehavior-property.md index 8eda2c8f426..e93de3f7979 100644 --- a/Language/Reference/User-Interface-Help/dragbehavior-property.md +++ b/Language/Reference/User-Interface-Help/dragbehavior-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether the system enables the drag-and-drop feature for a **TextBox** or **ComboBox**. - **Syntax** - _object_. **DragBehavior** [= _fmDragBehavior_ ] + +## Syntax + +_object_. **DragBehavior** [= _fmDragBehavior_ ] The **DragBehavior** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _fmDragBehavior_ are: | _fmDragBehaviorDisabled_|0|Does not allow a drag-and-drop action (default).| | _fmDragBehaviorEnabled_|1|Allows a drag-and-drop action.| - **Remarks** +## Remarks + If the **DragBehavior** property is enabled, dragging in a text box or combo box starts a drag-and-drop operation on the selected text. If **DragBehavior** is disabled, dragging in a text box or combo box selects text. The drop-down portion of a **ComboBox** does not support drag-and-drop processes, nor does it support selection of list items within the text. **DragBehavior** has no effect on a **ComboBox** whose **Style** property is set to **fmStyleDropDownList**. diff --git a/Language/Reference/User-Interface-Help/drawbuffer-property.md b/Language/Reference/User-Interface-Help/drawbuffer-property.md index ff3633daecc..c5f49bdf1e2 100644 --- a/Language/Reference/User-Interface-Help/drawbuffer-property.md +++ b/Language/Reference/User-Interface-Help/drawbuffer-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the number of pixels set aside for off-screen memory in rendering a frame. - **Syntax** - _object_. **DrawBuffer** [= _value_ ] + +## Syntax + +_object_. **DrawBuffer** [= _value_ ] |**Part**|**Description**| @@ -25,7 +27,8 @@ Specifies the number of pixels set aside for off-screen memory in rendering a fr | _object_|Required. A valid object name.| | _value_|An integer from 16,000 through 1,048,576 equal to the maximum number of pixels the object can render off-screen.| - **Remarks** +## Remarks + The **DrawBuffer** property specifies the maximum number of pixels that can be drawn at one time as the display repaints. The actual memory used by the object depends upon the screen resolution of the display. If you set a large value for **DrawBuffer**, performance will be slower. A large buffer only helps when several large images overlap. Use the **Properties** window to specify the value of **DrawBuffer**. diff --git a/Language/Reference/User-Interface-Help/drive-object.md b/Language/Reference/User-Interface-Help/drive-object.md index 55cd4800b8c..33bee92a680 100644 --- a/Language/Reference/User-Interface-Help/drive-object.md +++ b/Language/Reference/User-Interface-Help/drive-object.md @@ -17,7 +17,9 @@ ms.date: 06/08/2017 **Description** Provides access to the properties of a particular disk drive or network share. - **Remarks** + +## Remarks + The following code illustrates the use of the **Drive** object to access drive properties: diff --git a/Language/Reference/User-Interface-Help/drive-property.md b/Language/Reference/User-Interface-Help/drive-property.md index 6d872c85965..2788bf75426 100644 --- a/Language/Reference/User-Interface-Help/drive-property.md +++ b/Language/Reference/User-Interface-Help/drive-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the drive letter of the drive on which the specified file or folder resides. Read-only. - **Syntax** - _object_. **Drive** + +## Syntax + +_object_. **Drive** The _object_ is always a **File** or **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **Drive** property: diff --git a/Language/Reference/User-Interface-Help/driveexists-method.md b/Language/Reference/User-Interface-Help/driveexists-method.md index 9dc70d14517..7e65e67bcc3 100644 --- a/Language/Reference/User-Interface-Help/driveexists-method.md +++ b/Language/Reference/User-Interface-Help/driveexists-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns **True** if the specified drive exists; **False** if it does not. - **Syntax** - _object_. **DriveExists(**_drivespec_**)** + +## Syntax + +_object_. **DriveExists(**_drivespec_**)** The **DriveExists** method syntax has these parts: @@ -27,6 +29,7 @@ The **DriveExists** method syntax has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _drivespec_|Required. A drive letter or a path specification for the root of the drive.| - **Remarks** +## Remarks + For drives with removable media, the **DriveExists** method returns **True** even if there are no media present. Use the **IsReady** property of the **Drive** object to determine if a drive is ready. diff --git a/Language/Reference/User-Interface-Help/driveletter-property.md b/Language/Reference/User-Interface-Help/driveletter-property.md index 07cdf2a87ef..391590a8298 100644 --- a/Language/Reference/User-Interface-Help/driveletter-property.md +++ b/Language/Reference/User-Interface-Help/driveletter-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the drive letter of a physical local drive or a network share. Read-only. - **Syntax** - _object_. **DriveLetter** + +## Syntax + +_object_. **DriveLetter** The _object_ is always a **Drive** object. - **Remarks** + +## Remarks + The **DriveLetter** property returns a zero-length string ("") if the specified drive is not associated with a drive letter, for example, a network share that has not been mapped to a drive letter. The following code illustrates the use of the **DriveLetter** property: diff --git a/Language/Reference/User-Interface-Help/drives-collection.md b/Language/Reference/User-Interface-Help/drives-collection.md index 258e350744a..ca60936fa75 100644 --- a/Language/Reference/User-Interface-Help/drives-collection.md +++ b/Language/Reference/User-Interface-Help/drives-collection.md @@ -17,7 +17,9 @@ ms.date: 06/08/2017 **Description** Read-only collection of all available drives. - **Remarks** + +## Remarks + Removable-media drives need not have media inserted for them to appear in the **Drives** collection. The following code illustrates how to get the **Drives** collection and iterate the collection using the **For Each...Next** statement: diff --git a/Language/Reference/User-Interface-Help/drives-property.md b/Language/Reference/User-Interface-Help/drives-property.md index 73a5771de28..4d57bdaf41c 100644 --- a/Language/Reference/User-Interface-Help/drives-property.md +++ b/Language/Reference/User-Interface-Help/drives-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns a **Drives** collection consisting of all **Drive** objects available on the local machine. - **Syntax** - _object_. **Drives** + +## Syntax + +_object_. **Drives** The _object_ is always a **FileSystemObject**. - **Remarks** + +## Remarks + Removable-media drives need not have media inserted for them to appear in the **Drives** collection. You can iterate the members of the **Drives** collection using a **For Each...Next** construct as illustrated in the following code: diff --git a/Language/Reference/User-Interface-Help/drivetype-property.md b/Language/Reference/User-Interface-Help/drivetype-property.md index d701c10f0e5..17e6cc1c4e5 100644 --- a/Language/Reference/User-Interface-Help/drivetype-property.md +++ b/Language/Reference/User-Interface-Help/drivetype-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns a value indicating the type of a specified drive. - **Syntax** - _object_. **DriveType** + +## Syntax + +_object_. **DriveType** The _object_ is always a **Drive** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **DriveType** property: diff --git a/Language/Reference/User-Interface-Help/dropbuttonclick-event.md b/Language/Reference/User-Interface-Help/dropbuttonclick-event.md index ea3d321035d..4a57fea0749 100644 --- a/Language/Reference/User-Interface-Help/dropbuttonclick-event.md +++ b/Language/Reference/User-Interface-Help/dropbuttonclick-event.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Occurs whenever the drop-down list appears or disappears. - **Syntax** - **Private Sub**_object_ _**DropButtonClick( )** + +## Syntax + +**Private Sub**_object_ _**DropButtonClick( )** The **DropButtonClick** event syntax has these parts: @@ -25,7 +27,8 @@ The **DropButtonClick** event syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + You can initiate the DropButtonClick event through code or by taking certain actions in the user interface. In code, calling the **DropDown** method initiates the DropButtonClick event. In the user interface, any of the following actions initiates the event: diff --git a/Language/Reference/User-Interface-Help/dropbuttonstyle-property.md b/Language/Reference/User-Interface-Help/dropbuttonstyle-property.md index 36b8f4184cc..609adfc9b51 100644 --- a/Language/Reference/User-Interface-Help/dropbuttonstyle-property.md +++ b/Language/Reference/User-Interface-Help/dropbuttonstyle-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the symbol displayed on the drop button in a **ComboBox**. - **Syntax** - _object_. **DropButtonStyle** [= _fmDropButtonStyle_ ] + +## Syntax + +_object_. **DropButtonStyle** [= _fmDropButtonStyle_ ] The **DropButtonStyle** property syntax has these parts: @@ -37,6 +39,7 @@ The settings for _fmDropButtonStyle_ are: | _fmDropButtonStyleEllipsis_|2|Displays an ellipsis (...).| | _fmDropButtonStyleReduce_|3|Displays a horizontal line like an underscore character.| - **Remarks** +## Remarks + The recommended setting for showing items in a list is **fmDropButtonStyleArrow**. If you want to use the drop button in another way, such as to display a dialog box, specify **fmDropButtonStyleEllipsis**, **fmDropButtonStylePlain**, or **fmDropButtonStyleReduce** and trap the DropButtonClick event. diff --git a/Language/Reference/User-Interface-Help/dropdown-method.md b/Language/Reference/User-Interface-Help/dropdown-method.md index 898a762e3cb..a6f6fa578b0 100644 --- a/Language/Reference/User-Interface-Help/dropdown-method.md +++ b/Language/Reference/User-Interface-Help/dropdown-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Displays the list portion of a **ComboBox**. - **Syntax** - _object_. **DropDown** + +## Syntax + +_object_. **DropDown** The **DropDown** method syntax has these parts: @@ -25,6 +27,7 @@ The **DropDown** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + Use the **DropDown** method to open the list in a combo box. diff --git a/Language/Reference/User-Interface-Help/enabled-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/enabled-property-microsoft-forms.md index 24cbca509d5..a96e2145d0a 100644 --- a/Language/Reference/User-Interface-Help/enabled-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/enabled-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Specifies whether a control can receive the [focus](../../Glossary/vbe-glossary.md) and respond to user-generated events. - **Syntax** - _object_. **Enabled** [= _Boolean_ ] + +## Syntax + +_object_. **Enabled** [= _Boolean_ ] The **Enabled** property syntax has these parts: @@ -33,7 +35,8 @@ The settings for _Boolean_ are: |**True**|The control can receive the focus and respond to user-generated events, and is accessible through code (default).| |**False**|The user cannot interact with the control by using the mouse, keystrokes, accelerators, or hotkeys. The control is generally still accessible through code.| - **Remarks** +## Remarks + Use the **Enabled** property to enable and disable controls. A disabled control appears dimmed, while an enabled control does not. Also, if a control displays a bitmap, the bitmap is dimmed whenever the control is dimmed. If **Enabled** is **False** for an **Image**, the control does not initiate events but does not appear dimmed. The **Enabled** and **Locked** properties work together to achieve the following effects: diff --git a/Language/Reference/User-Interface-Help/end-statement.md b/Language/Reference/User-Interface-Help/end-statement.md index 12a402466cf..23a40b5c297 100644 --- a/Language/Reference/User-Interface-Help/end-statement.md +++ b/Language/Reference/User-Interface-Help/end-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Ends a [procedure](../../Glossary/vbe-glossary.md) or block. - **Syntax** +## Syntax - **End** +**End** **End** **Function** **End** **If** @@ -38,7 +38,8 @@ The **End** statement syntax has these forms: |**End Type**|Required to end a [user-defined type](../../Glossary/vbe-glossary.md) definition (**Type** statement).| |**End With**|Required to end a **With** statement.| - **Remarks** +## Remarks + When executed, the **End** statement resets all[module-level](../../Glossary/vbe-glossary.md) variables and all static local variables in all[modules](../../Glossary/vbe-glossary.md). To preserve the value of these variables, use the **Stop** statement instead. You can then resume execution while preserving the value of those variables. **Note** The **End** statement stops code execution abruptly, without invoking the Unload, QueryUnload, or Terminate event, or any other Visual Basic code. Code you have placed in the Unload, QueryUnload, and Terminate events of[forms](../../Glossary/vbe-glossary.md) and[class modules](../../Glossary/vbe-glossary.md) is not executed. Objects created from class modules are destroyed, files opened using the **Open** statement are closed, and memory used by your program is freed. Object references held by other programs are invalidated. diff --git a/Language/Reference/User-Interface-Help/enter-exit-events.md b/Language/Reference/User-Interface-Help/enter-exit-events.md index 0e5f761db14..5d0ea01e00e 100644 --- a/Language/Reference/User-Interface-Help/enter-exit-events.md +++ b/Language/Reference/User-Interface-Help/enter-exit-events.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Enter occurs before a control actually receives the [focus](../../Glossary/vbe-glossary.md) from a control on the same form. Exit occurs immediately before a control loses the focus to another control on the same form. - **Syntax** - **Private Sub**_object_ _**Enter( )** + +## Syntax + +**Private Sub**_object_ _**Enter( )** **Private Sub**_object_ _**Exit( ByVal**_Cancel_**As MSForms.ReturnBoolean)** The **Enter** and **Exit** event syntaxes have these parts: @@ -25,7 +27,8 @@ The **Enter** and **Exit** event syntaxes have these parts: | _object_|Required. A valid object name.| | _Cancel_|Required. Event status. **False** indicates that the control should handle the event (default). **True** indicates the application handles the event and the focus should remain at the current control.| - **Remarks** +## Remarks + The Enter and Exit events are similar to the GotFocus and LostFocus events in Visual Basic. Unlike GotFocus and LostFocus, the Enter and Exit events don't occur when a form receives or loses the focus. For example, suppose you select the check box that initiates the Enter event. If you then select another control in the same form, the Exit event is initiated for the check box (because focus is moving to a different object in the same form) and then the Enter event occurs for the second control on the form. Because the Enter event occurs before the focus moves to a particular control, you can use an Enter event procedure to display instructions; for example, you could use a macro or event procedure to display a small form or message box identifying the type of data the control typically contains. diff --git a/Language/Reference/User-Interface-Help/enterfieldbehavior-property.md b/Language/Reference/User-Interface-Help/enterfieldbehavior-property.md index 3a152969d2b..fdb1de3ac2b 100644 --- a/Language/Reference/User-Interface-Help/enterfieldbehavior-property.md +++ b/Language/Reference/User-Interface-Help/enterfieldbehavior-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the selection behavior when entering a **TextBox** or **ComboBox**. - **Syntax** - _object_. **EnterFieldBehavior** [= _fmEnterFieldBehavior_ ] + +## Syntax + +_object_. **EnterFieldBehavior** [= _fmEnterFieldBehavior_ ] The **EnterFieldBehavior** property syntax has these parts: @@ -35,6 +37,7 @@ The settings for _fmEnterFieldBehavior_ are: | _fmEnterFieldBehaviorSelectAll_|0|Selects the entire contents of the edit region when entering the control (default).| | _fmEnterFieldBehaviorRecallSelection_|1|Leaves the selection unchanged. Visually, this uses the selection that was in effect the last time the control was active.| - **Remarks** +## Remarks + The **EnterFieldBehavior** property controls the way text is selected when the user tabs to the control, not when the control receives[focus](../../Glossary/vbe-glossary.md) as a result of the **SetFocus** method. Following **SetFocus**, the contents of the control are not selected and the insertion point appears after the last character in the control's edit region. diff --git a/Language/Reference/User-Interface-Help/enterkeybehavior-property.md b/Language/Reference/User-Interface-Help/enterkeybehavior-property.md index 8b42f4034d7..4a5255e082e 100644 --- a/Language/Reference/User-Interface-Help/enterkeybehavior-property.md +++ b/Language/Reference/User-Interface-Help/enterkeybehavior-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Defines the effect of pressing ENTER in a **TextBox**. - **Syntax** - _object_. **EnterKeyBehavior** [= _Boolean_ ] + +## Syntax + +_object_. **EnterKeyBehavior** [= _Boolean_ ] The **EnterKeyBehavior** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|Pressing ENTER creates a new line.| |**False**|Pressing ENTER moves the focus to the next object in the tab order (default).| - **Remarks** +## Remarks + The **EnterKeyBehavior** and **MultiLine** properties are closely related. The values described above only apply if **MultiLine** is **True**. If **MultiLine** is **False**, pressing ENTER always moves the[focus](../../Glossary/vbe-glossary.md) to the next control in the[tab order](../../Glossary/vbe-glossary.md) regardless of the value of **EnterKeyBehavior**. The effect of pressing CTRL+ENTER also depends on the value of **MultiLine**. If **MultiLine** is **True**, pressing CTRL+ENTER creates a new line regardless of the value of **EnterKeyBehavior**. If **MultiLine** is **False**, pressing CTRL+ENTER has no effect. diff --git a/Language/Reference/User-Interface-Help/enum-statement.md b/Language/Reference/User-Interface-Help/enum-statement.md index 2311d04d9b5..a9725dbb889 100644 --- a/Language/Reference/User-Interface-Help/enum-statement.md +++ b/Language/Reference/User-Interface-Help/enum-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Declares a type for an enumeration. - **Syntax** +## Syntax [ **Public** |**Private** ] **Enum**_name_ @@ -32,7 +32,8 @@ The **Enum** statement has these parts: | _membername_|Required. A valid Visual Basic identifier specifying the name by which a constituent element of the **Enum** type will be known.| | _constantexpression_|Optional. Value of the element (evaluates to a **Long**). If no _constantexpression_ is specified, the value assigned is either zero (if it is the first _membername_ ), or 1 greater than the value of the immediately preceding _membername_.| - **Remarks** +## Remarks + Enumeration variables are variables declared with an **Enum** type. Both variables and parameters can be declared with an **Enum** type. The elements of the **Enum** type are initialized to constant values within the **Enum** statement. The assigned values can't be modified at[run time](../../Glossary/vbe-glossary.md) and can include both positive and negative numbers. For example: diff --git a/Language/Reference/User-Interface-Help/environ-function.md b/Language/Reference/User-Interface-Help/environ-function.md index d4906c9d334..3849e8a7da3 100644 --- a/Language/Reference/User-Interface-Help/environ-function.md +++ b/Language/Reference/User-Interface-Help/environ-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns the **String** associated with an operating system environment variable. Not available on the Macintosh - **Syntax** - **Environ(** { **_envstring_** |**_number_** } **)** + +## Syntax + +**Environ(** { **_envstring_** |**_number_** } **)** The **Environ** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -24,7 +26,8 @@ The **Environ** function syntax has these[named arguments](../../Glossary/vbe-g |**_envstring_**|Optional. [String expression](../../Glossary/vbe-glossary.md) containing the name of an environment variable.| |**_number_**|Optional. [Numeric expression](../../Glossary/vbe-glossary.md) corresponding to the numeric order of the environment string in the environment-string table. The **_number_**[argument](../../Glossary/vbe-glossary.md) can be any numeric expression, but is rounded to a whole number before it is evaluated.| - **Remarks** +## Remarks + If **_envstring_** can't be found in the environment-string table, a zero-length string ("") is returned. Otherwise, **Environ** returns the text assigned to the specified **_envstring_**; that is, the text following the equal sign (=) in the environment-string table for that environment variable. If you specify **_number_**, the string occupying that numeric position in the environment-string table is returned. In this case, **Environ** returns all of the text, including **_envstring_**. If there is no environment string in the specified position, **Environ** returns a zero-length string. diff --git a/Language/Reference/User-Interface-Help/eof-function.md b/Language/Reference/User-Interface-Help/eof-function.md index 553b54b4685..f010bcf486e 100644 --- a/Language/Reference/User-Interface-Help/eof-function.md +++ b/Language/Reference/User-Interface-Help/eof-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns an [Integer](../../Glossary/vbe-glossary.md) containing the[Boolean](../../Glossary/vbe-glossary.md) value **True** when the end of a file opened for **Random** or sequential **Input** has been reached. - **Syntax** - **EOF(**_filenumber_**)** + +## Syntax + +**EOF(**_filenumber_**)** The required _filenumber_[argument](../../Glossary/vbe-glossary.md) is an **Integer** containing any valid[file number](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + Use **EOF** to avoid the error generated by attempting to get input past the end of a file. The **EOF** function returns **False** until the end of the file has been reached. With files opened for **Random** or **Binary** access, **EOF** returns **False** until the last executed **Get** statement is unable to read an entire record. With files opened for **Binary** access, an attempt to read through the file using the **Input** function until **EOF** returns **True** generates an error. Use the **LOF** and **Loc** functions instead of **EOF** when reading binary files with **Input**, or use **Get** when using the **EOF** function. With files opened for **Output**, **EOF** always returns **True**. diff --git a/Language/Reference/User-Interface-Help/equals-operator.md b/Language/Reference/User-Interface-Help/equals-operator.md index b315db4cf43..c8bf17523dc 100644 --- a/Language/Reference/User-Interface-Help/equals-operator.md +++ b/Language/Reference/User-Interface-Help/equals-operator.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Used to assign a value to a [variable](../../Glossary/vbe-glossary.md) or[property](../../Glossary/vbe-glossary.md). - **Syntax** - _variable_**=**_value_ + +## Syntax + +_variable_**=**_value_ The **=** operator syntax has these parts: @@ -25,6 +27,7 @@ The **=** operator syntax has these parts: | _variable_|Any variable or any writable property.| | _value_|Any numeric or string literal, [constant](../../Glossary/vbe-glossary.md), or [expression](../../Glossary/vbe-glossary.md).| - **Remarks** +## Remarks + The name on the left side of the equal sign can be a simple scalar variable or an element of an [array](../../Glossary/vbe-glossary.md). Properties on the left side of the equal sign can only be those properties that are writable at [run time](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/eqv-operator.md b/Language/Reference/User-Interface-Help/eqv-operator.md index 961960389d7..67d33b36e4c 100644 --- a/Language/Reference/User-Interface-Help/eqv-operator.md +++ b/Language/Reference/User-Interface-Help/eqv-operator.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to perform a logical equivalence on two [expressions](../../Glossary/vbe-glossary.md). - **Syntax** - _result_**=**_expression1_ **Eqv** _expression2_ + +## Syntax + +_result_**=**_expression1_ **Eqv** _expression2_ The **Eqv** operator syntax has these parts: @@ -25,7 +27,8 @@ The **Eqv** operator syntax has these parts: | _expression1_|Required; any expression.| | _expression2_|Required; any expression.| - **Remarks** +## Remarks + If either expression is [Null](../../Glossary/vbe-glossary.md), _result_ is also **Null**. When neither expression is **Null**, _result_ is determined according to the following table: diff --git a/Language/Reference/User-Interface-Help/erase-statement.md b/Language/Reference/User-Interface-Help/erase-statement.md index 693fb3a7c2a..59529fabb97 100644 --- a/Language/Reference/User-Interface-Help/erase-statement.md +++ b/Language/Reference/User-Interface-Help/erase-statement.md @@ -13,13 +13,15 @@ ms.date: 06/08/2017 Reinitializes the elements of fixed-size [arrays](../../Glossary/vbe-glossary.md) and releases dynamic-array storage space. - **Syntax** +## Syntax - **Erase**_arraylist_ +**Erase**_arraylist_ The required _arraylist_[argument](../../Glossary/vbe-glossary.md) is one or more comma-delimited array[variables](../../Glossary/vbe-glossary.md) to be erased. - **Remarks** - **Erase** behaves differently depending on whether an array is fixed-size (ordinary) or dynamic. **Erase** recovers no memory for fixed-size arrays. **Erase** sets the elements of a fixed array as follows: + +## Remarks + +**Erase** behaves differently depending on whether an array is fixed-size (ordinary) or dynamic. **Erase** recovers no memory for fixed-size arrays. **Erase** sets the elements of a fixed array as follows: |**Type of Array**|**Effect of Erase on Fixed-Array Elements**| diff --git a/Language/Reference/User-Interface-Help/error-event.md b/Language/Reference/User-Interface-Help/error-event.md index c6dc631f4cd..a7d5a0b8a52 100644 --- a/Language/Reference/User-Interface-Help/error-event.md +++ b/Language/Reference/User-Interface-Help/error-event.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Occurs when a control detects an error and cannot return the error information to a calling program. - **Syntax** + +## Syntax + For MultiPage **Private Sub**_object_ _**Error(**_index_**As Long**, **ByVal**_Number_**As Integer**, **ByVal**_Description_**As MSForms.ReturnString**, **ByVal**_SCode_**As SCode**, **ByVal**_Source_**As String**, **ByVal**_HelpFile_**As String**, **ByVal**_HelpContext_**As Long**, **ByVal**_CancelDisplay_**As MSForms.ReturnBoolean)** For other controls **Private Sub**_object_ _**Error( ByVal**_Number_**As Integer**, **ByVal**_Description_**As MSForms.ReturnString**, **ByVal**_SCode_**As SCode**, **ByVal**_Source_**As String**, **ByVal**_HelpFile_**As String**, **ByVal**_HelpContext_**As Long**, **ByVal**_CancelDisplay_**As MSForms.ReturnBoolean)** The **Error** event syntax has these parts: @@ -34,7 +36,8 @@ The **Error** event syntax has these parts: | _HelpContext_|Required. Specifies the [context ID](../../../language/Glossary/glossary-vba.md) of the Help file topic that contains a description of the error.| | _CancelDisplay_|Required. Specifies whether to display the error string in a message box.| - **Remarks** +## Remarks + The code written for the Error event determines how the control responds to the error condition. The ability to handle error conditions varies from one application to another. The Error event is initiated when an error occurs that the application is not equipped to handle. diff --git a/Language/Reference/User-Interface-Help/error-function.md b/Language/Reference/User-Interface-Help/error-function.md index f6cf287ff5c..6580ffa400d 100644 --- a/Language/Reference/User-Interface-Help/error-function.md +++ b/Language/Reference/User-Interface-Help/error-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns the error message that corresponds to a given [error number](../../Glossary/vbe-glossary.md). - **Syntax** - **Error** [ **(**_errornumber_**)** ] + +## Syntax + +**Error** [ **(**_errornumber_**)** ] The optional _errornumber_[argument](../../Glossary/vbe-glossary.md) can be any valid error number. If _errornumber_ is a valid error number, but is not defined, **Error** returns the string "Application-defined or object-defined error." If _errornumber_ is not valid, an error occurs. If _errornumber_ is omitted, the message corresponding to the most recent[run-time error](../../Glossary/vbe-glossary.md) is returned. If no run-time error has occurred, or _errornumber_ is 0, **Error** returns a zero-length string (""). - **Remarks** + +## Remarks + Examine the [property](../../Glossary/vbe-glossary.md) settings of the **Err** object to identify the most recent run-time error. The return value of the **Error** function corresponds to the **Description** property of the **Err** object. ## Example diff --git a/Language/Reference/User-Interface-Help/error-statement.md b/Language/Reference/User-Interface-Help/error-statement.md index f2a1e73b149..c92343d1d27 100644 --- a/Language/Reference/User-Interface-Help/error-statement.md +++ b/Language/Reference/User-Interface-Help/error-statement.md @@ -13,12 +13,14 @@ ms.date: 06/08/2017 Simulates the occurrence of an error. - **Syntax** +## Syntax - **Error**_errornumber_ +**Error**_errornumber_ The required _errornumber_ can be any valid[error number](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + The **Error** statement is supported for backward compatibility. In new code, especially when creating objects, use the **Err** object's **Raise** method to generate[run-time errors](../../Glossary/vbe-glossary.md). If _errornumber_ is defined, the **Error** statement calls the error handler after the[properties](../../Glossary/vbe-glossary.md) of **Err** object are assigned the following default values: diff --git a/Language/Reference/User-Interface-Help/event-statement.md b/Language/Reference/User-Interface-Help/event-statement.md index 6cd9a748ecb..bfd479aa82d 100644 --- a/Language/Reference/User-Interface-Help/event-statement.md +++ b/Language/Reference/User-Interface-Help/event-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Declares a user-defined event. - **Syntax** +## Syntax [ **Public** ] **Event**_procedurename_ [ **(**_arglist_**)** ] @@ -36,7 +36,8 @@ The _arglist_ argument has the following syntax and parts: | _varname_|Required. Name of the variable representing the argument being passed to the [procedure](../../Glossary/vbe-glossary.md); follows standard variable naming conventions.| | _type_|Optional. [Data type](../../Glossary/vbe-glossary.md) of the argument passed to the procedure; may be[Byte](../../Glossary/vbe-glossary.md), [Boolean](../../Glossary/vbe-glossary.md), [Integer](../../Glossary/vbe-glossary.md), [Long](../../Glossary/vbe-glossary.md), [Currency](../../Glossary/vbe-glossary.md), [Single](../../Glossary/vbe-glossary.md), [Double](../../Glossary/vbe-glossary.md), [Decimal](../../Glossary/vbe-glossary.md) (not currently supported),[Date](../../Glossary/vbe-glossary.md), [String](../../Glossary/vbe-glossary.md) (variable length only),[Object](../../Glossary/vbe-glossary.md), [Variant](../../Glossary/vbe-glossary.md), a [user-defined type](../../Glossary/vbe-glossary.md), or an object type.| - **Remarks** +## Remarks + Once the event has been declared, use the **RaiseEvent** statement to fire the event. A syntax error occurs if an **Event** declaration appears in a[standard module](../../Glossary/vbe-glossary.md). An event can't be declared to return a value. A typical event might be declared and raised as shown in the following fragments: diff --git a/Language/Reference/User-Interface-Help/events-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/events-object-vba-add-in-object-model.md index 927b6704113..71c4a56aa05 100644 --- a/Language/Reference/User-Interface-Help/events-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/events-object-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Supplies [properties](../../Glossary/vbe-glossary.md) that enable[add-ins](../../Glossary/vbe-glossary.md) to connect to all events in Visual Basic for Applications. - **Remarks** + +## Remarks + The **Events** object provides properties that return[event source objects](../../Glossary/vbe-glossary.md). Use the properties to return event source objects that notify you of changes in the Visual Basic for Applications environment. The properties of the **Events** object return objects of the same type as the property name. For example, the **CommandBarEvents** property returns the **CommandBarEvents** object. diff --git a/Language/Reference/User-Interface-Help/events-property.md b/Language/Reference/User-Interface-Help/events-property.md index 2e0d3bfee9d..1f4c1e4907f 100644 --- a/Language/Reference/User-Interface-Help/events-property.md +++ b/Language/Reference/User-Interface-Help/events-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Supplies properties that enable add-ins to connect to all events in Visual Basic for Applications. - **Syntax** - _object_. **Events** + +## Syntax + +_object_. **Events** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. diff --git a/Language/Reference/User-Interface-Help/exists-method.md b/Language/Reference/User-Interface-Help/exists-method.md index 91ad3268eb1..b6e13fea0ce 100644 --- a/Language/Reference/User-Interface-Help/exists-method.md +++ b/Language/Reference/User-Interface-Help/exists-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns **True** if a specified key exists in the **Dictionary** object; **False** if it does not. - **Syntax** - _object_. **Exists(**_key_**)** + +## Syntax + +_object_. **Exists(**_key_**)** The **Exists** method syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/exit-statement.md b/Language/Reference/User-Interface-Help/exit-statement.md index 5515fb0e0b3..2cfd3edbd76 100644 --- a/Language/Reference/User-Interface-Help/exit-statement.md +++ b/Language/Reference/User-Interface-Help/exit-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Exits a block of **Do…Loop**, **For…Next**, **Function**, **Sub**, or **Property** code. - **Syntax** +## Syntax - **Exit** **Do** +**Exit** **Do** **Exit For** **Exit Function** @@ -32,7 +32,8 @@ The **Exit** statement syntax has these forms: |**Exit Property**|Immediately exits the **Property** procedure in which it appears. Execution continues with the statement following the statement that called the **Property** procedure.| |**Exit Sub**|Immediately exits the **Sub** procedure in which it appears. Execution continues with the statement following the statement that called the **Sub** procedure.| - **Remarks** +## Remarks + Do not confuse **Exit** statements with **End** statements. **Exit** does not define the end of a structure. ## Example diff --git a/Language/Reference/User-Interface-Help/exp-function.md b/Language/Reference/User-Interface-Help/exp-function.md index 1e924d1a320..0564b57286d 100644 --- a/Language/Reference/User-Interface-Help/exp-function.md +++ b/Language/Reference/User-Interface-Help/exp-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Double** specifying _e_ (the base of natural logarithms) raised to a power. - **Syntax** - **Exp(**_number_**)** + +## Syntax + +**Exp(**_number_**)** The required _number_[argument](../../Glossary/vbe-glossary.md) is a[Double](../../Glossary/vbe-glossary.md) or any valid[numeric expression](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + If the value of _number_ exceeds 709.782712893, an error occurs. The[constant ](../../Glossary/vbe-glossary.md) _e_ is approximately 2.718282. **Note** The **Exp** function complements the action of the **Log** function and is sometimes referred to as the antilogarithm. diff --git a/Language/Reference/User-Interface-Help/export-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/export-method-vba-add-in-object-model.md index f7333277d12..f4db72b9d06 100644 --- a/Language/Reference/User-Interface-Help/export-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/export-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Saves a component as a separate file or files. - **Syntax** - _object_**.Export(**_filename_**)** + +## Syntax + +_object_**.Export(**_filename_**)** The **Export** syntax has these parts: @@ -24,6 +26,7 @@ The **Export** syntax has these parts: | _object_|Required. An [object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list.| | _filename_|Required. A [String](../../Glossary/vbe-glossary.md) specifying the name of the file that you want to export the component to.| - **Remarks** +## Remarks + When you use the **Export** method to save a component as a separate file or files, use a file name that doesn't already exist; otherwise, an error occurs. diff --git a/Language/Reference/User-Interface-Help/file-object.md b/Language/Reference/User-Interface-Help/file-object.md index 1465aae722e..563ad8f6107 100644 --- a/Language/Reference/User-Interface-Help/file-object.md +++ b/Language/Reference/User-Interface-Help/file-object.md @@ -17,7 +17,9 @@ ms.date: 06/08/2017 **Description** Provides access to all the properties of a file. - **Remarks** + +## Remarks + The following code illustrates how to obtain a **File** object and how to view one of its properties. diff --git a/Language/Reference/User-Interface-Help/fileattr-function.md b/Language/Reference/User-Interface-Help/fileattr-function.md index 75063c9472f..4ada1cb85c3 100644 --- a/Language/Reference/User-Interface-Help/fileattr-function.md +++ b/Language/Reference/User-Interface-Help/fileattr-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) representing the file mode for files opened using the **Open** statement. - **Syntax** - **FileAttr( _filenumber_, _returntype_ )** + +## Syntax + +**FileAttr( _filenumber_, _returntype_ )** The **FileAttr** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): diff --git a/Language/Reference/User-Interface-Help/filecopy-statement.md b/Language/Reference/User-Interface-Help/filecopy-statement.md index 15f384824b8..8a821d41303 100644 --- a/Language/Reference/User-Interface-Help/filecopy-statement.md +++ b/Language/Reference/User-Interface-Help/filecopy-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Copies a file. - **Syntax** +## Syntax - **FileCopy** **_source_,** **_destination_** +**FileCopy** **_source_,** **_destination_** The **FileCopy** statement syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,7 +25,8 @@ The **FileCopy** statement syntax has these[named arguments](../../Glossary/vbe |**_source_**|Required. [String expression](../../Glossary/vbe-glossary.md) that specifies the name of the file to be copied. The **_source_** may include directory or folder, and drive.| |**_destination_**|Required. String expression that specifies the target file name. The **_destination_** may include directory or folder, and drive.| - **Remarks** +## Remarks + If you try to use the **FileCopy** statement on a currently open file, an error occurs. ## Example diff --git a/Language/Reference/User-Interface-Help/filedatetime-function.md b/Language/Reference/User-Interface-Help/filedatetime-function.md index e1daac5d004..9e0c774acdf 100644 --- a/Language/Reference/User-Interface-Help/filedatetime-function.md +++ b/Language/Reference/User-Interface-Help/filedatetime-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Date**) that indicates the date and time when a file was created or last modified. - **Syntax** - **FileDateTime(**_pathname_**)** + +## Syntax + +**FileDateTime(**_pathname_**)** The required _pathname_[argument](../../Glossary/vbe-glossary.md) is a[string expression](../../Glossary/vbe-glossary.md) that specifies a file name. The _pathname_ may include the directory or folder, and the drive. ## Example diff --git a/Language/Reference/User-Interface-Help/fileexists-method.md b/Language/Reference/User-Interface-Help/fileexists-method.md index 5491aaa8a70..299997409e4 100644 --- a/Language/Reference/User-Interface-Help/fileexists-method.md +++ b/Language/Reference/User-Interface-Help/fileexists-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns **True** if a specified file exists; **False** if it does not. - **Syntax** - _object_. **FileExists(**_filespec_**)** + +## Syntax + +_object_. **FileExists(**_filespec_**)** The **FileExists** method syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/filelen-function.md b/Language/Reference/User-Interface-Help/filelen-function.md index 6843a68dd4c..7233eed5a98 100644 --- a/Language/Reference/User-Interface-Help/filelen-function.md +++ b/Language/Reference/User-Interface-Help/filelen-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) specifying the length of a file in bytes. - **Syntax** - **FileLen(**_pathname_**)** + +## Syntax + +**FileLen(**_pathname_**)** The required _pathname_[argument](../../Glossary/vbe-glossary.md) is a[string expression](../../Glossary/vbe-glossary.md) that specifies a file. The _pathname_ may include the directory or folder, and the drive. - **Remarks** + +## Remarks + If the specified file is open when the **FileLen** function is called, the value returned represents the size of the file immediately before it was opened. **Note** To obtain the length of an open file, use the **LOF** function. diff --git a/Language/Reference/User-Interface-Help/filename-property.md b/Language/Reference/User-Interface-Help/filename-property.md index e29071293b4..b7bdcaf5737 100644 --- a/Language/Reference/User-Interface-Help/filename-property.md +++ b/Language/Reference/User-Interface-Help/filename-property.md @@ -16,10 +16,14 @@ ms.date: 06/08/2017 Returns the full path name of the project file or host document. - **Syntax** - _object_**.Filename** + +## Syntax + +_object_**.Filename** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + Projects have no name other than the file name. The path name returned is always provided as an absolute path (for example, "c:\projects\myproject.vba"), even if it is shown as a relative path (such as "..\projects\myproject.vba"). diff --git a/Language/Reference/User-Interface-Help/files-collection.md b/Language/Reference/User-Interface-Help/files-collection.md index 166490ade10..ac6d1c7bdc6 100644 --- a/Language/Reference/User-Interface-Help/files-collection.md +++ b/Language/Reference/User-Interface-Help/files-collection.md @@ -17,7 +17,9 @@ ms.date: 06/08/2017 **Description** Collection of all **File** objects within a folder. - **Remarks** + +## Remarks + The following code illustrates how to get a **Files** collection and iterate the collection using the **For Each...Next** statement: diff --git a/Language/Reference/User-Interface-Help/files-property.md b/Language/Reference/User-Interface-Help/files-property.md index 0829ed515a8..0a541e81fd8 100644 --- a/Language/Reference/User-Interface-Help/files-property.md +++ b/Language/Reference/User-Interface-Help/files-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns a **Files** collection consisting of all **File** objects contained in the specified folder, including those with hidden and system file attributes set. - **Syntax** - _object_. **Files** + +## Syntax + +_object_. **Files** The _object_ is always a **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **Files** property: diff --git a/Language/Reference/User-Interface-Help/filesystem-property.md b/Language/Reference/User-Interface-Help/filesystem-property.md index eb6c7d99fd4..d383a727486 100644 --- a/Language/Reference/User-Interface-Help/filesystem-property.md +++ b/Language/Reference/User-Interface-Help/filesystem-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the type of file system in use for the specified drive. - **Syntax** - _object_. **FileSystem** + +## Syntax + +_object_. **FileSystem** The _object_ is always a **Drive** object. - **Remarks** + +## Remarks + Available return types include FAT, NTFS, and CDFS. The following code illustrates the use of the **FileSystem** property: diff --git a/Language/Reference/User-Interface-Help/filesystemobject-object.md b/Language/Reference/User-Interface-Help/filesystemobject-object.md index 0c6aafb4f48..bbd2a352ef2 100644 --- a/Language/Reference/User-Interface-Help/filesystemobject-object.md +++ b/Language/Reference/User-Interface-Help/filesystemobject-object.md @@ -17,9 +17,13 @@ ms.date: 06/08/2017 **Description** Provides access to a computer's file system. - **Syntax** - **Scripting.FileSystemObject** - **Remarks** + +## Syntax + +**Scripting.FileSystemObject** + +## Remarks + The following code illustrates how the **FileSystemObject** is used to return a **TextStream** object that can be read from or written to: diff --git a/Language/Reference/User-Interface-Help/filter-function.md b/Language/Reference/User-Interface-Help/filter-function.md index 635ded49d15..7b57582948a 100644 --- a/Language/Reference/User-Interface-Help/filter-function.md +++ b/Language/Reference/User-Interface-Help/filter-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns a zero-based array containing subset of a string array based on a specified filter criteria. - **Syntax** - **Filter( _sourcearray, match_** [ **_, include_** [ **_, compare_** ]] **)** + +## Syntax + +**Filter( _sourcearray, match_** [ **_, include_** [ **_, compare_** ]] **)** The **Filter** function syntax has these[named argument](../../Glossary/vbe-glossary.md): @@ -38,7 +40,8 @@ The **_compare_** argument can have the following values: |**vbTextCompare**| 1|Performs a textual comparison.| |**vbDatabaseCompare**| 2|Microsoft Access only. Performs a comparison based on information in your database.| - **Remarks** +## Remarks + If no matches of **_match_** are found within **_sourcearray_**, **Filter** returns an empty array. An error occurs if **_sourcearray_** is **Null** or is not a one-dimensional array. The array returned by the **Filter** function contains only enough elements to contain the number of matched items. diff --git a/Language/Reference/User-Interface-Help/find-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/find-method-vba-add-in-object-model.md index b1f77efd284..94c32f581c2 100644 --- a/Language/Reference/User-Interface-Help/find-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/find-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Searches the active [module](../../Glossary/vbe-glossary.md) for a specified string. - **Syntax** - _object_**.Find(**_target_, _startline_, _startcol_, _endline_, _endcol_ [, _wholeword_ ] [, _matchcase_ ] [, _patternsearch_ ] **) As Boolean** + +## Syntax + +_object_**.Find(**_target_, _startline_, _startcol_, _endline_, _endcol_ [, _wholeword_ ] [, _matchcase_ ] [, _patternsearch_ ] **) As Boolean** The **Find** syntax has these parts: @@ -31,8 +33,9 @@ The **Find** syntax has these parts: | _matchcase_|Optional. A **Boolean** value specifying whether to match case. If **True**, the search is case sensitive. **False** is the default.| | _patternsearch_|Optional. A **Boolean** value specifying whether or not the target string is a regular expression pattern. If **True**, the target string is a regular expression pattern. **False** is the default.| - **Remarks** - **Find** returns **True** if a match is found and **False** if a match isn't found. +## Remarks + +**Find** returns **True** if a match is found and **False** if a match isn't found. The _matchcase_ and _patternsearch_[arguments](../../Glossary/vbe-glossary.md) are mutually exclusive; if both arguments are passed as **True**, an error occurs. The content of the **Find** dialog box isn't affected by the **Find** method. The specified range of lines and columns is inclusive, so a search can find the pattern on the specified last line if _endcol_ is supplied as either -1 or the length of the line. diff --git a/Language/Reference/User-Interface-Help/folder-object.md b/Language/Reference/User-Interface-Help/folder-object.md index 985765d407f..0394533fe5f 100644 --- a/Language/Reference/User-Interface-Help/folder-object.md +++ b/Language/Reference/User-Interface-Help/folder-object.md @@ -17,7 +17,9 @@ ms.date: 06/08/2017 **Description** Provides access to all the properties of a folder. - **Remarks** + +## Remarks + The following code illustrates how to obtain a **Folder** object and how to return one of its properties: diff --git a/Language/Reference/User-Interface-Help/folderexists-method.md b/Language/Reference/User-Interface-Help/folderexists-method.md index f6c8d726e7d..be85d8d7fab 100644 --- a/Language/Reference/User-Interface-Help/folderexists-method.md +++ b/Language/Reference/User-Interface-Help/folderexists-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns **True** if a specified folder exists; **False** if it does not. - **Syntax** - _object_. **FolderExists(**_folderspec_ ) + +## Syntax + +_object_. **FolderExists(**_folderspec_ ) The **FolderExists** method syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/folders-collection.md b/Language/Reference/User-Interface-Help/folders-collection.md index 62868fb8f5b..252d207b84d 100644 --- a/Language/Reference/User-Interface-Help/folders-collection.md +++ b/Language/Reference/User-Interface-Help/folders-collection.md @@ -17,7 +17,9 @@ ms.date: 06/08/2017 **Description** Collection of all **Folder** objects contained within a **Folder** object. - **Remarks** + +## Remarks + The following code illustrates how to get a **Folders** collection and how to iterate the collection using the **For Each...Next** statement: diff --git a/Language/Reference/User-Interface-Help/font-object-microsoft-forms.md b/Language/Reference/User-Interface-Help/font-object-microsoft-forms.md index b81f47a339a..b54fe57d537 100644 --- a/Language/Reference/User-Interface-Help/font-object-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/font-object-microsoft-forms.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Defines the characteristics of the text used by a control or form. - **Remarks** + +## Remarks + Each control or form has its own **Font** object to let you set its text characteristics independently of the characteristics defined for other controls and forms. Use font properties to specify the font name, to set bold or underlined text, or to adjust the size of the text. **Note** The font properties of your form or [container](../../Glossary/vbe-glossary.md) determine the default font attributes of controls you put on the form. diff --git a/Language/Reference/User-Interface-Help/for-eachnext-statement.md b/Language/Reference/User-Interface-Help/for-eachnext-statement.md index 19e56ed8bb8..6fa1726c8a0 100644 --- a/Language/Reference/User-Interface-Help/for-eachnext-statement.md +++ b/Language/Reference/User-Interface-Help/for-eachnext-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Repeats a group of [statements](../../Glossary/vbe-glossary.md) for each element in an[array](../../Glossary/vbe-glossary.md) or[collection](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **For** **Each**_element_**In**_group_ +**For** **Each**_element_**In**_group_ [ _statements_ ] [ **Exit For** ] [ _statements_ ] @@ -30,7 +30,8 @@ The **For...Each...Next** statement syntax has these parts: | _group_|Required. Name of an object collection or array (except an array of [user-defined types](../../Glossary/vbe-glossary.md)).| | _statements_|Optional. One or more statements that are executed on each item in _group_.| - **Remarks** +## Remarks + The **For…Each** block is entered if there is at least one element in _group_. Once the loop has been entered, all the statements in the loop are executed for the first element in _group_. If there are more elements in _group_, the statements in the loop continue to execute for each element. When there are no more elements in _group_, the loop is exited and execution continues with the statement following the **Next** statement. Any number of **Exit For** statements may be placed anywhere in the loop as an alternative way to exit. **Exit For** is often used after evaluating some condition, for example **If…Then**, and transfers control to the statement immediately following **Next**. You can nest **For...Each...Next** loops by placing one **For…Each…Next** loop within another. However, each loop _element_ must be unique. diff --git a/Language/Reference/User-Interface-Help/forecolor-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/forecolor-property-microsoft-forms.md index e3a6e1e23d2..b86a94885cd 100644 --- a/Language/Reference/User-Interface-Help/forecolor-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/forecolor-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Specifies the [foreground color](../../../language/Glossary/glossary-vba.md) of an object. - **Syntax** - _object_. **ForeColor** [= _Long_ ] + +## Syntax + +_object_. **ForeColor** [= _Long_ ] The **ForeColor** property syntax has these parts: @@ -26,7 +28,9 @@ The **ForeColor** property syntax has these parts: **Settings** You can use any integer that represents a valid color. You can also specify a color by using the [RGB](../../../language/Glossary/glossary-vba.md) function with red, green, and blue color components. The value of each color component is an integer that ranges from zero to 255. For example, you can specify teal blue as the integer value 4966415 or as red, green, and blue color components 15, 200, 75. - **Remarks** + +## Remarks + Use the **ForeColor** property for controls on forms to make them easy to read or to convey a special meaning. For example, if a text box reports the number of units in stock, you can change the color of the text when the value falls below the reorder level. For a **ScrollBar** or **SpinButton**, **ForeColor** sets the color of the arrows. For a **Frame**, **ForeColor** changes the color of the caption. For a **Font** object, **ForeColor** determines the color of the text. diff --git a/Language/Reference/User-Interface-Help/format-function-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/format-function-visual-basic-for-applications.md index c56dab1550f..c9e707ce79d 100644 --- a/Language/Reference/User-Interface-Help/format-function-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/format-function-visual-basic-for-applications.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns a **Variant (String)** containing an [expression](../../Glossary/vbe-glossary.md) formatted according to instructions contained in a format expression. - **Syntax** - **Format(**_expression_ [ **,**_format_ [ **,**_firstdayofweek_ [ **,**_firstweekofyear_ ]]] **)** + +## Syntax + +**Format(**_expression_ [ **,**_format_ [ **,**_firstdayofweek_ [ **,**_firstweekofyear_ ]]] **)** The **Format** function syntax has these parts: @@ -52,8 +54,7 @@ The _firstweekofyear_ argument has these settings: |**vbFirstFourDays**|2|Start with the first week that has at least four days in the year.| |**vbFirstFullWeek**|3|Start with the first full week of the year.| - **Remarks** - +## Remarks |**To Format**|**Do This**| |:-----|:-----| @@ -94,9 +95,8 @@ If the calendar is Gregorian, the meaning of _format_ expression symbols is unc | _s_ |0-59 (Second of minute, with no leading zero)| | _ss_ |0-59 (Second of minute, with a leading zero)| +## Example - **Example** - This example shows various uses of the **Format** function to format values using both named formats and user-defined formats. For the date separator (**/**), time separator (**:**), and AM/ PM literal, the actual formatted output displayed by your system depends on the locale settings on which the code is running. When times and dates are displayed in the development environment, the short time format and short date format of the code locale are used. When displayed by running code, the short time format and short date format of the system locale are used, which may differ from the code locale. For this example, English/U.S. is assumed. `MyTime` and `MyDate` are displayed in the development environment using current system short time setting and short date setting. diff --git a/Language/Reference/User-Interface-Help/formatcurrency-function.md b/Language/Reference/User-Interface-Help/formatcurrency-function.md index eec65792ea1..fc534669289 100644 --- a/Language/Reference/User-Interface-Help/formatcurrency-function.md +++ b/Language/Reference/User-Interface-Help/formatcurrency-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns an expression formatted as a currency value using the currency symbol defined in the system control panel. - **Syntax** - **FormatCurrency(**_Expression_ [ **,**_NumDigitsAfterDecimal_ [ **,**_IncludeLeadingDigit_ [ **,**_UseParensForNegativeNumbers_ [ **,**_GroupDigits_ ]]]] **)** + +## Syntax + +**FormatCurrency(**_Expression_ [ **,**_NumDigitsAfterDecimal_ [ **,**_IncludeLeadingDigit_ [ **,**_UseParensForNegativeNumbers_ [ **,**_GroupDigits_ ]]]] **)** The **FormatCurrency** function syntax has these parts: @@ -38,7 +40,8 @@ The _IncludeLeadingDigit_, _UseParensForNegativeNumbers_, and _GroupDigits_ arg |**vbFalse**| 0|False| |**vbUseDefault**|-2|Use the setting from the computer's regional settings.| - **Remarks** +## Remarks + When one or more optional arguments are omitted, the values for omitted arguments are provided by the computer's regional settings. The position of the currency symbol relative to the currency value is determined by the system's regional settings. diff --git a/Language/Reference/User-Interface-Help/formatdatetime-function.md b/Language/Reference/User-Interface-Help/formatdatetime-function.md index f3da08c5db2..b857506e37e 100644 --- a/Language/Reference/User-Interface-Help/formatdatetime-function.md +++ b/Language/Reference/User-Interface-Help/formatdatetime-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns an expression formatted as a date or time. - **Syntax** - **FormatDateTime(**_Date_ [ **,**_NamedFormat_ ] **)** + +## Syntax + +**FormatDateTime(**_Date_ [ **,**_NamedFormat_ ] **)** The **FormatDateTime** function syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/formatnumber-function.md b/Language/Reference/User-Interface-Help/formatnumber-function.md index 2fc9afbcd7f..7458e17a456 100644 --- a/Language/Reference/User-Interface-Help/formatnumber-function.md +++ b/Language/Reference/User-Interface-Help/formatnumber-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns an expression formatted as a number. - **Syntax** - **FormatNumber(**_Expression_ [ **,**_NumDigitsAfterDecimal_ [ **,**_IncludeLeadingDigit_ [ **,**_UseParensForNegativeNumbers_ [ **,**_GroupDigits_ ]]]] **)** + +## Syntax + +**FormatNumber(**_Expression_ [ **,**_NumDigitsAfterDecimal_ [ **,**_IncludeLeadingDigit_ [ **,**_UseParensForNegativeNumbers_ [ **,**_GroupDigits_ ]]]] **)** The **FormatNumber** function syntax has these parts: @@ -38,7 +40,8 @@ The _IncludeLeadingDigit_, _UseParensForNegativeNumbers_, and _GroupDigits_ arg |**vbFalse**| 0|False| |**vbUseDefault**|-2|Use the setting from the computer's regional settings.| - **Remarks** +## Remarks + When one or more optional arguments are omitted, the values for omitted arguments are provided by the computer's regional settings. **Note** All settings information comes from the **Regional Settings Number** tab. diff --git a/Language/Reference/User-Interface-Help/formatpercent-function.md b/Language/Reference/User-Interface-Help/formatpercent-function.md index 8e7caac63e4..1733e6079c7 100644 --- a/Language/Reference/User-Interface-Help/formatpercent-function.md +++ b/Language/Reference/User-Interface-Help/formatpercent-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns an expression formatted as a percentage (multipled by 100) with a trailing % character. - **Syntax** - **FormatPercent(**_Expression_ [ **,**_NumDigitsAfterDecimal_ [ **,**_IncludeLeadingDigit_ [ **,**_UseParensForNegativeNumbers_ [ **,**_GroupDigits_ ]]]] **)** + +## Syntax + +**FormatPercent(**_Expression_ [ **,**_NumDigitsAfterDecimal_ [ **,**_IncludeLeadingDigit_ [ **,**_UseParensForNegativeNumbers_ [ **,**_GroupDigits_ ]]]] **)** The **FormatPercent** function syntax has these parts: @@ -38,7 +40,8 @@ The _IncludeLeadingDigit_, _UseParensForNegativeNumbers_, and _GroupDigits_ arg |**vbFalse**| 0|False| |**vbUseDefault**|-2|Use the setting from the computer's regional settings.| - **Remarks** +## Remarks + When one or more optional arguments are omitted, the values for omitted arguments are provided by the computer's regional settings. **Note** All settings information comes from the **Regional Settings Number** tab. diff --git a/Language/Reference/User-Interface-Help/fornext-statement.md b/Language/Reference/User-Interface-Help/fornext-statement.md index 7aea5c8fd6b..645862529e0 100644 --- a/Language/Reference/User-Interface-Help/fornext-statement.md +++ b/Language/Reference/User-Interface-Help/fornext-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Repeats a group of [statements](../../Glossary/vbe-glossary.md) a specified number of times. - **Syntax** +## Syntax - **For**_counter_**=**_start_**To**_end_ [ **Step**_step_ ] +**For**_counter_**=**_start_**To**_end_ [ **Step**_step_ ] [ _statements_ ] [ **Exit For** ] [ _statements_ ] @@ -32,7 +32,8 @@ The **For…Next** statement syntax has these parts: | _step_|Optional. Amount _counter_ is changed each time through the loop. If not specified, _step_ defaults to one.| | _statements_|Optional. One or more statements between **For** and **Next** that are executed the specified number of times.| - **Remarks** +## Remarks + The _step_[argument](../../Glossary/vbe-glossary.md) can be either positive or negative. The value of the _step_ argument determines loop processing as follows: diff --git a/Language/Reference/User-Interface-Help/frame-control.md b/Language/Reference/User-Interface-Help/frame-control.md index 24efb638fd9..f5470ea1b12 100644 --- a/Language/Reference/User-Interface-Help/frame-control.md +++ b/Language/Reference/User-Interface-Help/frame-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Creates a functional and visual [control group](../../../language/Glossary/glossary-vba.md). - **Remarks** + +## Remarks + All option buttons in a **Frame** are mutually exclusive, so you can use the **Frame** to create an option group. You can also use a **Frame** to group controls with closely related contents.For example, in an application that processes customer orders, you might use a **Frame** to group the name, address, and account number of customers. You can also use a **Frame** to create a group of toggle buttons, but the toggle buttons are not mutually exclusive. The default event for a **Frame** is the Click event. diff --git a/Language/Reference/User-Interface-Help/freefile-function.md b/Language/Reference/User-Interface-Help/freefile-function.md index 75459d1c21d..7c0c909c406 100644 --- a/Language/Reference/User-Interface-Help/freefile-function.md +++ b/Language/Reference/User-Interface-Help/freefile-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns an [Integer](../../Glossary/vbe-glossary.md) representing the next [file number](../../Glossary/vbe-glossary.md) available for use by the **Open** statement. - **Syntax** - **FreeFile** [ **(**_rangenumber_**)** ] + +## Syntax + +**FreeFile** [ **(**_rangenumber_**)** ] The optional _rangenumber_ argument is a[Variant](../../Glossary/vbe-glossary.md) that specifies the range from which the next free file number is to be returned. Specify a 0 (default) to return a file number in the range 1 - 255, inclusive. Specify a 1 to return a file number in the range 256 - 511. - **Remarks** + +## Remarks + Use **FreeFile** to supply a file number that is not already in use. ## Example diff --git a/Language/Reference/User-Interface-Help/freespace-property.md b/Language/Reference/User-Interface-Help/freespace-property.md index 8afb486423b..f75d6224dc3 100644 --- a/Language/Reference/User-Interface-Help/freespace-property.md +++ b/Language/Reference/User-Interface-Help/freespace-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the amount of free space available to a user on the specified drive or network share. Read-only. - **Syntax** - _object_. **FreeSpace** + +## Syntax + +_object_. **FreeSpace** The _object_ is always a **Drive** object. - **Remarks** + +## Remarks + The value returned by the **FreeSpace** property is typically the same as that returned by the **AvailableSpace** property. Differences may occur between the two for computer systems that support quotas. The following code illustrates the use of the **FreeSpace** property: diff --git a/Language/Reference/User-Interface-Help/friend-keyword.md b/Language/Reference/User-Interface-Help/friend-keyword.md index 98c8b062a8c..f1b2f76e28f 100644 --- a/Language/Reference/User-Interface-Help/friend-keyword.md +++ b/Language/Reference/User-Interface-Help/friend-keyword.md @@ -13,13 +13,15 @@ ms.date: 06/08/2017 Modifies the definition of a [procedure](../../Glossary/vbe-glossary.md) in a form module or[class module](../../Glossary/vbe-glossary.md) to make the procedure callable from modules that are outside the[class](../../Glossary/vbe-glossary.md), but part of the [project](../../Glossary/vbe-glossary.md) within which the class is defined. **Friend** procedures cannot be used in standard modules. - **Syntax** +## Syntax [ **Private** |**Friend** |**Public** ] [ **Static** ] [ **Sub** |**Function** |**Property** ] _procedurename_ The required _procedurename_ is the name of the procedure to be made visible throughout the project, but not visible to controllers of the class. - **Remarks** - **Public** procedures in a class can be called from anywhere, even by controllers of instances of the class. Declaring a procedure **Private** prevents controllers of the object from calling the procedure, but also prevents the procedure from being called from within the project in which the class itself is defined. **Friend** makes the procedure visible throughout the project, but not to a controller of an instance of the object. **Friend** can appear only in form modules and class modules, and can only modify procedure names, not[variables](../../Glossary/vbe-glossary.md) or types. Procedures in a class can access the **Friend** procedures of all other classes in a project. **Friend** procedures don't appear in the[type library](../../Glossary/vbe-glossary.md) of their class. A **Friend** procedure can't be late bound. + +## Remarks + +**Public** procedures in a class can be called from anywhere, even by controllers of instances of the class. Declaring a procedure **Private** prevents controllers of the object from calling the procedure, but also prevents the procedure from being called from within the project in which the class itself is defined. **Friend** makes the procedure visible throughout the project, but not to a controller of an instance of the object. **Friend** can appear only in form modules and class modules, and can only modify procedure names, not[variables](../../Glossary/vbe-glossary.md) or types. Procedures in a class can access the **Friend** procedures of all other classes in a project. **Friend** procedures don't appear in the[type library](../../Glossary/vbe-glossary.md) of their class. A **Friend** procedure can't be late bound. ## Friend Example diff --git a/Language/Reference/User-Interface-Help/function-statement.md b/Language/Reference/User-Interface-Help/function-statement.md index 15e51bf7d2e..cb62bc64641 100644 --- a/Language/Reference/User-Interface-Help/function-statement.md +++ b/Language/Reference/User-Interface-Help/function-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Declares the name, [arguments](../../Glossary/vbe-glossary.md), and code that form the body of a **Function**[procedure](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax [ **Public** |**Private | Friend** ] [ **Static** ] **Function**_name_ [ **(**_arglist_**)** ] [ **As**_type_ ] [ _statements_ ] @@ -52,7 +52,8 @@ The _arglist_ argument has the following syntax and parts: | _type_|Optional. Data type of the argument passed to the procedure; may be **Byte**, **Boolean**, **Integer**, **Long**, **Currency**, **Single**, **Double**, **Decimal** (not currently supported) **Date**, **String** (variable length only), **Object**, **Variant**, or a specific[object type](../../Glossary/vbe-glossary.md). If the parameter is not **Optional**, a user-defined type may also be specified.| | _defaultvalue_|Optional. Any [constant](../../Glossary/vbe-glossary.md) or constant expression. Valid for **Optional** parameters only. If the type is an **Object**, an explicit default value can only be **Nothing**.| - **Remarks** +## Remarks + If not explicitly specified using **Public**, **Private**, or **Friend**, **Function** procedures are public by default. If **Static** isn't used, the value of local variables is not preserved between calls. The **Friend** keyword can only be used in class modules. However, **Friend** procedures can be accessed by procedures in any module of a project. A **Friend** procedure does't appear in the[type library](../../Glossary/vbe-glossary.md) of its parent class, nor can a **Friend** procedure be late bound. **Function** procedures can be recursive; that is, they can call themselves to perform a given task. However, recursion can lead to stack overflow. The **Static** keyword usually isn't used with recursive **Function** procedures. All executable code must be in procedures. You can't define a **Function** procedure inside another **Function**, **Sub**, or **Property** procedure. diff --git a/Language/Reference/User-Interface-Help/fv-function.md b/Language/Reference/User-Interface-Help/fv-function.md index 0ab12695df8..5b8980debd2 100644 --- a/Language/Reference/User-Interface-Help/fv-function.md +++ b/Language/Reference/User-Interface-Help/fv-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the future value of an annuity based on periodic, fixed payments and a fixed interest rate. - **Syntax** - **FV( _rate_**, **_nper_**, **_pmt_** [, **_pv_** [, **_type_** ]] **)** + +## Syntax + +**FV( _rate_**, **_nper_**, **_pmt_** [, **_pv_** [, **_type_** ]] **)** The **FV** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -27,7 +29,8 @@ The **FV** function has these[named arguments](../../Glossary/vbe-glossary.md): |**_pv_**|Optional. [Variant](../../Glossary/vbe-glossary.md) specifying present value (or lump sum) of a series of future payments. For example, when you borrow money to buy a car, the loan amount is the present value to the lender of the monthly car payments you will make. If omitted, 0 is assumed.| |**_type_**|Optional. **Variant** specifying when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.| - **Remarks** +## Remarks + An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan). The **_rate_** and **_nper_**[arguments](../../Glossary/vbe-glossary.md) must be calculated using payment periods expressed in the same units. For example, if **_rate_** is calculated using months, **_nper_** must also be calculated using months. For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers. diff --git a/Language/Reference/User-Interface-Help/get-statement.md b/Language/Reference/User-Interface-Help/get-statement.md index be9cca66f83..189f3a52740 100644 --- a/Language/Reference/User-Interface-Help/get-statement.md +++ b/Language/Reference/User-Interface-Help/get-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Reads data from an open disk file into a [variable](../../Glossary/vbe-glossary.md). -**Syntax** +## Syntax **Get** [ **#** ] _filenumber_**,** [ _recnumber_ ] **,**_varname_ @@ -26,7 +26,7 @@ The **Get** statement syntax has these parts: | _recnumber_|Optional. **Variant** (**Long**). Record number (**Random** mode files) or byte number (**Binary** mode files) at which reading begins.| | _varname_|Required. Valid variable name into which data is read.| -**Remarks** +## Remarks Data read with **Get** is usually written to a file with **Put**. The first record or byte in a file is at position 1, the second record or byte is at position 2, and so on. If you omit _recnumber_, the next record or byte following the last **Get** or **Put** [statement](../../Glossary/vbe-glossary.md) (or pointed to by the last **Seek** function) is read. You must include delimiting commas, for example: diff --git a/Language/Reference/User-Interface-Help/getabsolutepathname-method.md b/Language/Reference/User-Interface-Help/getabsolutepathname-method.md index 39ca49605ec..34745bd6358 100644 --- a/Language/Reference/User-Interface-Help/getabsolutepathname-method.md +++ b/Language/Reference/User-Interface-Help/getabsolutepathname-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns a complete and unambiguous path from a provided path specification. - **Syntax** - _object_. **GetAbsolutePathName(**_pathspec_**)** + +## Syntax + +_object_. **GetAbsolutePathName(**_pathspec_**)** The **GetAbsolutePathName** method syntax has these parts: @@ -27,7 +29,8 @@ The **GetAbsolutePathName** method syntax has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _pathspec_|Required. Path specification to change to a complete and unambiguous path.| - **Remarks** +## Remarks + A path is complete and unambiguous if it provides a complete reference from the root of the specified drive. A complete path can only end with a path separator character (**\**) if it specifies the root folder of a mapped drive. Assuming the current directory is c:\mydocuments\reports, the following table illustrates the behavior of the **GetAbsolutePathName** method. diff --git a/Language/Reference/User-Interface-Help/getallsettings-function.md b/Language/Reference/User-Interface-Help/getallsettings-function.md index e84fbb8a228..515c1df28d8 100644 --- a/Language/Reference/User-Interface-Help/getallsettings-function.md +++ b/Language/Reference/User-Interface-Help/getallsettings-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a list of key settings and their respective values (originally created with **SaveSetting**) from an application's entry in the Windows[registry](../../Glossary/vbe-glossary.md) or (on the Macintosh) information in the application's initialization file. - **Syntax** - **GetAllSettings( _appname,_** **_section_ )** + +## Syntax + +**GetAllSettings( _appname,_** **_section_ )** The **GetAllSettings** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -24,8 +26,9 @@ The **GetAllSettings** function syntax has these[named arguments](../../Glossar |**_appname_**|Required. [String expression](../../Glossary/vbe-glossary.md) containing the name of the application or[project](../../Glossary/vbe-glossary.md) whose key settings are requested. On the Macintosh, this is the filename of the initialization file in the Preferences folder in the System folder.| |**_section_**|Required. String e **xpression** containing the name of the section whose key settings are requested. **GetAllSettings** returns a[Variant](../../Glossary/vbe-glossary.md) whose contents is a two-dimensional[array](../../Glossary/vbe-glossary.md) of strings containing all the key settings in the specified section and their corresponding values.| - **Remarks** - **GetAllSettings** returns an uninitialized **Variant** if either **_appname_** or **_section_** does not exist. +## Remarks + +**GetAllSettings** returns an uninitialized **Variant** if either **_appname_** or **_section_** does not exist. ## Example diff --git a/Language/Reference/User-Interface-Help/getattr-function.md b/Language/Reference/User-Interface-Help/getattr-function.md index 0ca8572a948..10bc878643c 100644 --- a/Language/Reference/User-Interface-Help/getattr-function.md +++ b/Language/Reference/User-Interface-Help/getattr-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns an **Integer** representing the attributes of a file, directory, or folder. - **Syntax** - **GetAttr(**_pathname_**)** + +## Syntax + +**GetAttr(**_pathname_**)** The required _pathname_[argument](../../Glossary/vbe-glossary.md) is a[string expression](../../Glossary/vbe-glossary.md) that specifies a file name. The _pathname_ may include the directory or folder, and the drive. **Return Values** The value returned by **GetAttr** is the sum of the following attribute values: @@ -33,7 +35,8 @@ The value returned by **GetAttr** is the sum of the following attribute values: **Note** These [constants](../../Glossary/vbe-glossary.md) are specified by Visual Basic for Applications. The names can be used anywhere in your code in place of the actual values. - **Remarks** +## Remarks + To determine which attributes are set, use the **And** operator to perform a[bitwise comparison](../../Glossary/vbe-glossary.md) of the value returned by the **GetAttr** function and the value of the individual file attribute you want. If the result is not zero, that attribute is set for the named file. For example, the return value of the following **And** expression is zero if the Archive attribute is not set: diff --git a/Language/Reference/User-Interface-Help/getbasename-method.md b/Language/Reference/User-Interface-Help/getbasename-method.md index a3c7c70eec5..5060133b451 100644 --- a/Language/Reference/User-Interface-Help/getbasename-method.md +++ b/Language/Reference/User-Interface-Help/getbasename-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns a string containing the base name of the last component, less any file extension, in a path. - **Syntax** - _object_. **GetBaseName(**_path_**)** + +## Syntax + +_object_. **GetBaseName(**_path_**)** The **GetBaseName** method syntax has these parts: @@ -27,7 +29,8 @@ The **GetBaseName** method syntax has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _path_|Required. The path specification for the component whose base name is to be returned.| - **Remarks** +## Remarks + The **GetBaseName** method returns a zero-length string ("") if no component matches the _path_ argument. **Note** The **GetBaseName** method works only on the provided _path_ string. It does not attempt to resolve the path, nor does it check for the existence of the specified path. diff --git a/Language/Reference/User-Interface-Help/getdrive-method.md b/Language/Reference/User-Interface-Help/getdrive-method.md index 6d82abcd7dd..9d3a7f3f6ae 100644 --- a/Language/Reference/User-Interface-Help/getdrive-method.md +++ b/Language/Reference/User-Interface-Help/getdrive-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns a **Drive** object corresponding to the drive in a specified path. - **Syntax** - _object_. **GetDrive**_drivespec_ + +## Syntax + +_object_. **GetDrive**_drivespec_ The **GetDrive** method syntax has these parts: @@ -27,7 +29,8 @@ The **GetDrive** method syntax has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _drivespec_|Required. The _drivespec_ argument can be a drive letter (c), a drive letter with a colon appended (c:), a drive letter with a colon and path separator appended (c:\), or any network share specification (\\computer2\share1).| - **Remarks** +## Remarks + For network shares, a check is made to ensure that the share exists. An error occurs if _drivespec_ does not conform to one of the accepted forms or does not exist. To call the **GetDrive** method on a normal path string, use the following sequence to get a string that is suitable for use as _drivespec_: diff --git a/Language/Reference/User-Interface-Help/getdrivename-method.md b/Language/Reference/User-Interface-Help/getdrivename-method.md index 7e422085241..0a2afb24da5 100644 --- a/Language/Reference/User-Interface-Help/getdrivename-method.md +++ b/Language/Reference/User-Interface-Help/getdrivename-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns a string containing the name of the drive for a specified path. - **Syntax** - _object_. **GetDriveName(**_path_**)** + +## Syntax + +_object_. **GetDriveName(**_path_**)** The **GetDriveName** method syntax has these parts: @@ -27,7 +29,8 @@ The **GetDriveName** method syntax has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _path_|Required. The path specification for the component whose drive name is to be returned.| - **Remarks** +## Remarks + The **GetDriveName** method returns a zero-length string ("") if the drive can't be determined. **Note** The **GetDriveName** method works only on the provided _path_ string. It does not attempt to resolve the path, nor does it check for the existence of the specified path. diff --git a/Language/Reference/User-Interface-Help/getextensionname-method.md b/Language/Reference/User-Interface-Help/getextensionname-method.md index 9212eacfce8..48af26d51a0 100644 --- a/Language/Reference/User-Interface-Help/getextensionname-method.md +++ b/Language/Reference/User-Interface-Help/getextensionname-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns a string containing the extension name for the last component in a path. - **Syntax** - _object_. **GetExtensionName(**_path_**)** + +## Syntax + +_object_. **GetExtensionName(**_path_**)** The **GetExtensionName** method syntax has these parts: @@ -27,7 +29,8 @@ The **GetExtensionName** method syntax has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _path_|Required. The path specification for the component whose extension name is to be returned.| - **Remarks** +## Remarks + For network drives, the root directory (**\**) is considered to be a component. The **GetExtensionName** method returns a zero-length string ("") if no component matches the _path_ argument. diff --git a/Language/Reference/User-Interface-Help/getfile-method.md b/Language/Reference/User-Interface-Help/getfile-method.md index c279429cc8f..4c3f095fbd3 100644 --- a/Language/Reference/User-Interface-Help/getfile-method.md +++ b/Language/Reference/User-Interface-Help/getfile-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns a **File** object corresponding to the file in a specified path. - **Syntax** - _object_. **GetFile(**_filespec_**)** + +## Syntax + +_object_. **GetFile(**_filespec_**)** The **GetFile** method syntax has these parts: @@ -27,6 +29,7 @@ The **GetFile** method syntax has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _filespec_|Required. The _filespec_ is the path (absolute or relative) to a specific file.| - **Remarks** +## Remarks + An error occurs if the specified file does not exist. diff --git a/Language/Reference/User-Interface-Help/getfilename-method-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/getfilename-method-visual-basic-for-applications.md index 6823f04a8b9..f3e365b129d 100644 --- a/Language/Reference/User-Interface-Help/getfilename-method-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/getfilename-method-visual-basic-for-applications.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns the last component of specified path that is not part of the drive specification. - **Syntax** - _object_. **GetFileName(**_pathspec_**)** + +## Syntax + +_object_. **GetFileName(**_pathspec_**)** The **GetFileName** method syntax has these parts: @@ -25,7 +27,8 @@ The **GetFileName** method syntax has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _pathspec_|Required. The path (absolute or relative) to a specific file.| - **Remarks** +## Remarks + The **GetFileName** method returns a zero-length string ("") if _pathspec_ does not end with the named component. **Note** The **GetFileName** method works only on the provided path string. It does not attempt to resolve the path, nor does it check for the existence of the specified path. diff --git a/Language/Reference/User-Interface-Help/getfolder-method.md b/Language/Reference/User-Interface-Help/getfolder-method.md index 4dbe52ed629..c0f58f8d935 100644 --- a/Language/Reference/User-Interface-Help/getfolder-method.md +++ b/Language/Reference/User-Interface-Help/getfolder-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns a **Folder** object corresponding to the folder in a specified path. - **Syntax** - _object_. **GetFolder(**_folderspec_**)** + +## Syntax + +_object_. **GetFolder(**_folderspec_**)** The **GetFolder** method syntax has these parts: @@ -27,6 +29,7 @@ The **GetFolder** method syntax has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _folderspec_|Required. The _folderspec_ is the path (absolute or relative) to a specific folder.| - **Remarks** +## Remarks + An error occurs if the specified folder does not exist. diff --git a/Language/Reference/User-Interface-Help/getformat-method.md b/Language/Reference/User-Interface-Help/getformat-method.md index d7266b701e1..e5c653cdb3e 100644 --- a/Language/Reference/User-Interface-Help/getformat-method.md +++ b/Language/Reference/User-Interface-Help/getformat-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns an integer value indicating whether a specific [format](../../../language/Glossary/glossary-vba.md) is on the **DataObject**. - **Syntax** - _Boolean_ = _object_. **GetFormat(**_format_**)** + +## Syntax + +_Boolean_ = _object_. **GetFormat(**_format_**)** The **GetFormat** method syntax has these parts: @@ -35,7 +37,8 @@ The settings for _format_ are: |1|Text format.| |A string or any integer other than 1|A user-defined **DataObject** format passed to the **DataObject** from **SetText**.| - **Remarks** +## Remarks + The **GetFormat** method searches for a format in the current list of formats on the **DataObject**. If the format is on the **DataObject**, **GetFormat** returns **True**; if not, **GetFormat** returns **False**. The **DataObject** currently supports only text formats. diff --git a/Language/Reference/User-Interface-Help/getfromclipboard-method.md b/Language/Reference/User-Interface-Help/getfromclipboard-method.md index 3c1f9a290e4..09a8e39e0c6 100644 --- a/Language/Reference/User-Interface-Help/getfromclipboard-method.md +++ b/Language/Reference/User-Interface-Help/getfromclipboard-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Copies data from the Clipboard to a **DataObject**. - **Syntax** - _String = object_. **GetFromClipboard( )** + +## Syntax + +_String = object_. **GetFromClipboard( )** The **GetFromClipboard** method syntax has these parts: @@ -25,6 +27,7 @@ The **GetFromClipboard** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object name.| - **Remarks** +## Remarks + The **DataObject** can contain multiple data items, but each item must be in a different format. For example, the **DataObject** might include one text item and one item in a custom format; but cannot include two text items. diff --git a/Language/Reference/User-Interface-Help/getobject-function.md b/Language/Reference/User-Interface-Help/getobject-function.md index 4af542eb6ed..3ea6a0f9454 100644 --- a/Language/Reference/User-Interface-Help/getobject-function.md +++ b/Language/Reference/User-Interface-Help/getobject-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a reference to an object provided by an ActiveX component. - **Syntax** - **GetObject(** [ **_pathname_** ] [ **, _class_** ] **)** + +## Syntax + +**GetObject(** [ **_pathname_** ] [ **, _class_** ] **)** The **GetObject** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -32,7 +34,8 @@ The **_class_**[argument](../../Glossary/vbe-glossary.md) uses the syntax _appn | _appname_|Required; **Variant** (**String**). The name of the application providing the object.| | _objecttype_|Required; **Variant** (**String**). The type or class of object to create.| - **Remarks** +## Remarks + Use the **GetObject** function to access an ActiveX object from a file and assign the object to an[object variable](../../Glossary/vbe-glossary.md). Use the **Set** statement to assign the object returned by **GetObject** to the object variable. For example: diff --git a/Language/Reference/User-Interface-Help/getparentfoldername-method.md b/Language/Reference/User-Interface-Help/getparentfoldername-method.md index 54e07dda817..904ab44aa7a 100644 --- a/Language/Reference/User-Interface-Help/getparentfoldername-method.md +++ b/Language/Reference/User-Interface-Help/getparentfoldername-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns a string containing the name of the parent folder of the last component in a specified path. - **Syntax** - _object_. **GetParentFolderName(**_path_**)** + +## Syntax + +_object_. **GetParentFolderName(**_path_**)** The **GetParentFolderName** method syntax has these parts: @@ -27,7 +29,8 @@ The **GetParentFolderName** method syntax has these parts: | _object_|Required. Always the name of a **FileSystemObject**.| | _path_|Required. The path specification for the component whose parent folder name is to be returned.| - **Remarks** +## Remarks + The **GetParentFolderName** method returns a zero-length string ("") if there is no parent folder for the component specified in the _path_ argument. **Note** The **GetParentFolderName** method works only on the provided _path_ string. It does not attempt to resolve the path, nor does it check for the existence of the specified path. diff --git a/Language/Reference/User-Interface-Help/getselection-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/getselection-method-vba-add-in-object-model.md index 29f9e12a39c..b1fe06c3a50 100644 --- a/Language/Reference/User-Interface-Help/getselection-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/getselection-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns the selection in a [code pane](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.GetSelection(**_startline_, _startcol_, _endline_, _endcol_**)** + +## Syntax + +_object_**.GetSelection(**_startline_, _startcol_, _endline_, _endcol_**)** The **GetSelection** syntax has these parts: @@ -27,6 +29,7 @@ The **GetSelection** syntax has these parts: | _endline_|Required. A **Long** that returns a value specifying the last line of the selection in the code pane.| | _endcol_|Required. A **Long** that returns a value specifying the last column of the selection in the code pane.| - **Remarks** +## Remarks + When you use the **GetSelection** method, information is returned in output[arguments](../../Glossary/vbe-glossary.md). As a result, you must pass in [variables](../../Glossary/vbe-glossary.md) because the variables will be modified to contain the information when returned. diff --git a/Language/Reference/User-Interface-Help/getsetting-function.md b/Language/Reference/User-Interface-Help/getsetting-function.md index 242b0944702..1d4b0f8fba7 100644 --- a/Language/Reference/User-Interface-Help/getsetting-function.md +++ b/Language/Reference/User-Interface-Help/getsetting-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a key setting value from an application's entry in the Windows [registry](../../Glossary/vbe-glossary.md) or (on the Macintosh) information in the application's initialization file. - **Syntax** - **GetSetting( _appname_,** **_section_,** **_key_** [ **,** **_default_** ] **)** + +## Syntax + +**GetSetting( _appname_,** **_section_,** **_key_** [ **,** **_default_** ] **)** The **GetSetting** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -26,7 +28,8 @@ The **GetSetting** function syntax has these[named arguments](../../Glossary/vb |**_key_**|Required. String expression containing the name of the key setting to return.| |**_default_**|Optional. [Expression](../../Glossary/vbe-glossary.md) containing the value to return if no value is set in the key setting. If omitted, **_default_** is assumed to be a zero-length string ("").| - **Remarks** +## Remarks + If any of the items named in the **GetSetting** arguments do not exist, **GetSetting** returns the value of **_default_**. ## Example diff --git a/Language/Reference/User-Interface-Help/getspecialfolder-method.md b/Language/Reference/User-Interface-Help/getspecialfolder-method.md index 65e1a4e7cb3..eb0703f388e 100644 --- a/Language/Reference/User-Interface-Help/getspecialfolder-method.md +++ b/Language/Reference/User-Interface-Help/getspecialfolder-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Returns the special folder specified. - **Syntax** - _object_**.GetSpecialFolder(**_folderspec_**)** + +## Syntax + +_object_**.GetSpecialFolder(**_folderspec_**)** The **GetSpecialFolder** method syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/gettempname-method.md b/Language/Reference/User-Interface-Help/gettempname-method.md index cbb976c32a5..8c3d64ed057 100644 --- a/Language/Reference/User-Interface-Help/gettempname-method.md +++ b/Language/Reference/User-Interface-Help/gettempname-method.md @@ -17,9 +17,13 @@ ms.date: 06/08/2017 **Description** Returns a randomly generated temporary file or folder name that is useful for performing operations that require a temporary file or folder. - **Syntax** - _object_. **GetTempName** + +## Syntax + +_object_. **GetTempName** The optional _object_ is always the name of a **FileSystemObject**. - **Remarks** + +## Remarks + The **GetTempName** method does not create a file. It provides only a temporary file name that can be used with **CreateTextFile** to create a file. diff --git a/Language/Reference/User-Interface-Help/gettext-method-microsoft-forms.md b/Language/Reference/User-Interface-Help/gettext-method-microsoft-forms.md index 1d44de40b90..5dd8c04b4d8 100644 --- a/Language/Reference/User-Interface-Help/gettext-method-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/gettext-method-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Retrieves a text string from the **DataObject** using the specified[format](../../../language/Glossary/glossary-vba.md). - **Syntax** - _String_ = _object_. **GetText(** [ _format_ ] **)** + +## Syntax + +_String_ = _object_. **GetText(** [ _format_ ] **)** The **GetText** method syntax has these parts: @@ -33,7 +35,8 @@ The settings for _format_ are: |1|Text format.| |A string or any integer other than 1|A user-defined **DataObject** format passed to the **DataObject** from **SetText**.| - **Remarks** +## Remarks + The **DataObject** supports multiple formats, but only supports one data item of each format. For example, the **DataObject** might include one text item and one item in a custom format; but cannot include two text items. If no format is specified, the **GetText** method requests information in the Text format from the **DataObject**. diff --git a/Language/Reference/User-Interface-Help/gosubreturn-statement.md b/Language/Reference/User-Interface-Help/gosubreturn-statement.md index 8cdaacea063..acdf601fc30 100644 --- a/Language/Reference/User-Interface-Help/gosubreturn-statement.md +++ b/Language/Reference/User-Interface-Help/gosubreturn-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Branches to and returns from a subroutine within a [procedure](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **GoSub**_line_ +**GoSub**_line_ `...` _line_ @@ -24,7 +24,9 @@ Branches to and returns from a subroutine within a [procedure](../../Glossary/vb **Return** The _line_[argument](../../Glossary/vbe-glossary.md) can be any[line label](../../Glossary/vbe-glossary.md) or[line number](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + You can use **GoSub** and **Return** anywhere in a procedure, but **GoSub** and the corresponding **Return** statement must be in the same procedure. A subroutine can contain more than one **Return** statement, but the first **Return** statement encountered causes the flow of execution to branch back to the[statement](../../Glossary/vbe-glossary.md) immediately following the most recently executed **GoSub** statement. **Note** You can't enter or exit **Sub** procedures with **GoSub...Return**. diff --git a/Language/Reference/User-Interface-Help/goto-statement.md b/Language/Reference/User-Interface-Help/goto-statement.md index 769e62a176a..5928f52132e 100644 --- a/Language/Reference/User-Interface-Help/goto-statement.md +++ b/Language/Reference/User-Interface-Help/goto-statement.md @@ -11,15 +11,15 @@ ms.date: 06/08/2017 Branches unconditionally to a specified line within a [procedure](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **GoTo** _line_ +**GoTo** _line_ The required _line_ [argument](../../Glossary/vbe-glossary.md) can be any [line label](../../Glossary/vbe-glossary.md) or [line number](../../Glossary/vbe-glossary.md). - **Remarks** - - **GoTo** can branch only to lines within the procedure where it appears. +## Remarks + +**GoTo** can branch only to lines within the procedure where it appears. >**Note** Too many **GoTo** statements can make code difficult to read and debug. Use structured control [statements](../../Glossary/vbe-glossary.md) (**Do...Loop**, **For...Next**, **If...Then...Else**, **Select Case**) whenever possible. diff --git a/Language/Reference/User-Interface-Help/groupname-property.md b/Language/Reference/User-Interface-Help/groupname-property.md index 20f8655ae72..823b0a37cf5 100644 --- a/Language/Reference/User-Interface-Help/groupname-property.md +++ b/Language/Reference/User-Interface-Help/groupname-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Creates a group of mutually exclusive **OptionButton** controls. - **Syntax** - _object_. **GroupName** [= _String_ ] + +## Syntax + +_object_. **GroupName** [= _String_ ] The **GroupName** property syntax has these parts: @@ -26,7 +28,8 @@ The **GroupName** property syntax has these parts: | _object_|Required. A valid **OptionButton**.| | _String_|Optional. The name of the group that includes the **OptionButton**. Use the same setting for all buttons in the group. The default setting is an empty string.| - **Remarks** +## Remarks + To create a group of mutually exclusive **OptionButton** controls, you can put the buttons in a **Frame** on your form, or you can use the **GroupName** property. **GroupName** is more efficient for the following reasons: diff --git a/Language/Reference/User-Interface-Help/height-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/height-property-vba-add-in-object-model.md index 620a000343b..95f59499b1d 100644 --- a/Language/Reference/User-Interface-Help/height-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/height-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a [Single](../../Glossary/vbe-glossary.md) containing the height of the window in[twips](../../Glossary/vbe-glossary.md). Read/write. - **Remarks** + +## Remarks + Changing the **Height** property setting of a[linked window](../../Glossary/vbe-glossary.md) or[docked window](../../Glossary/vbe-glossary.md) has no effect as long as the window remains linked or docked. diff --git a/Language/Reference/User-Interface-Help/height-width-properties.md b/Language/Reference/User-Interface-Help/height-width-properties.md index 753a1a3b9ac..de5741c3697 100644 --- a/Language/Reference/User-Interface-Help/height-width-properties.md +++ b/Language/Reference/User-Interface-Help/height-width-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 The height or width, in [points](../../Glossary/vbe-glossary.md), of an object. - **Syntax** - _object_. **Height** [= _Single_ ] + +## Syntax + +_object_. **Height** [= _Single_ ] _object_. **Width** [= _Single_ ] The **Height** and **Width** property syntaxes have these parts: @@ -25,7 +27,8 @@ The **Height** and **Width** property syntaxes have these parts: | _object_|Required. A valid object.| | _Single_|Optional. A numeric expression specifying the dimensions of an object.| - **Remarks** +## Remarks + The **Height** and **Width** properties are automatically updated when you move or size a control. If you change the size of a control, the **Height** or **Width** property stores the new height or width and the **OldHeight** or **OldWidth** property stores the previous height or width. If you specify a setting for the **Left** or **Top** property that is less than zero, that value will be used to calculate the height or width of the control, but a portion of the control will not be visible on the form. If you move a control from one part of a form to another, the setting of **Height** or **Width** only changes if you size the control as you move it. The settings of the control's **Left** and **Top** properties will change to reflect the control's new position relative to the edges of the form that contains it. The value assigned to **Height** or **Width** must be greater than or equal to zero. For most systems, the recommended range of values is from 0 to +32,767. Higher values may also work depending on your system configuration. diff --git a/Language/Reference/User-Interface-Help/helpcontext-property-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/helpcontext-property-visual-basic-for-applications.md index da0f2928987..c155888731d 100644 --- a/Language/Reference/User-Interface-Help/helpcontext-property-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/helpcontext-property-visual-basic-for-applications.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a [string expression](../../Glossary/vbe-glossary.md) containing the context ID for a topic in a Help file. Read/write. - **Remarks** + +## Remarks + The **HelpContext**[property](../../Glossary/vbe-glossary.md) is used to automatically display the Help topic specified in the **HelpFile** property. If both **HelpFile** and **HelpContext** are empty, the value of **Number** is checked. If **Number** corresponds to a Visual Basic[run-time error](../../Glossary/vbe-glossary.md) value, then the Visual Basic Help context ID for the error is used. If the **Number** value doesn't correspond to a Visual Basic error, the contents screen for the Visual Basic Help file is displayed. **Note** You should write routines in your application to handle typical errors. When programming with an object, you can use the object's Help file to improve the quality of your error handling, or to display a meaningful message to your user if the error isn't recoverable. diff --git a/Language/Reference/User-Interface-Help/helpcontextid-property.md b/Language/Reference/User-Interface-Help/helpcontextid-property.md index a7990e1cd13..c75da594364 100644 --- a/Language/Reference/User-Interface-Help/helpcontextid-property.md +++ b/Language/Reference/User-Interface-Help/helpcontextid-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 The **HelpContextID** property associates a specific topic in a custom Microsoft Windows Help file with a specific control. - **Syntax** - _object_. **HelpContextID** [= _Long_ ] + +## Syntax + +_object_. **HelpContextID** [= _Long_ ] The **HelpContextID** property syntax has these parts: @@ -26,7 +28,8 @@ The **HelpContextID** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. A positive integer specifies the [context ID](../../../language/Glossary/glossary-vba.md) of a topic in the Help file associated with the object. Zero indicates no Help topic is associated with the object (default). Must be a valid context ID in the specified Help file.| - **Remarks** +## Remarks + The topic identified by the **HelpContextID** property is available to users when a form is running. To display the topic, the user must either select the control or set[focus](../../Glossary/vbe-glossary.md) to the control, and then press F1. The **HelpContextID** property refers to a topic in a custom Help file you have created to describe your form or application. In Visual Basic, the custom Help file is a property of the[project](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/helpfile-property.md b/Language/Reference/User-Interface-Help/helpfile-property.md index 0d21cfabe62..f9e611d5929 100644 --- a/Language/Reference/User-Interface-Help/helpfile-property.md +++ b/Language/Reference/User-Interface-Help/helpfile-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Returns or sets a [string expression](../../Glossary/vbe-glossary.md) the fully qualified path to a Help file. Read/write. - **Remarks** + +## Remarks + If a Help file is specified in **HelpFile**, it is automatically called when the user presses the **Help** button (or the F1 KEY in Windows or the HELP key on the Macintosh) in the error message dialog box. If the **HelpContext** property contains a valid context ID for the specified file, that topic is automatically displayed. If no **HelpFile** is specified, the Visual Basic Help file is displayed. **Note** You should write routines in your application to handle typical errors. When programming with an object, you can use the object's Help file to improve the quality of your error handling, or to display a meaningful message to your user if the error isn't recoverable. diff --git a/Language/Reference/User-Interface-Help/hex-function.md b/Language/Reference/User-Interface-Help/hex-function.md index a9363d432b0..6a0b70518ec 100644 --- a/Language/Reference/User-Interface-Help/hex-function.md +++ b/Language/Reference/User-Interface-Help/hex-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a [String](../../Glossary/vbe-glossary.md) representing the hexadecimal value of a number. - **Syntax** - **Hex** ( _number_ ) + +## Syntax + +**Hex** ( _number_ ) The required _number_[argument](../../Glossary/vbe-glossary.md) is any valid[numeric expression](../../Glossary/vbe-glossary.md) or[string expression](../../Glossary/vbe-glossary.md) _._ - **Remarks** + +## Remarks + If _number_ is not already a whole number, it is rounded to the nearest whole number before being evaluated. diff --git a/Language/Reference/User-Interface-Help/hide-method.md b/Language/Reference/User-Interface-Help/hide-method.md index 0e123e2a6f8..12789616170 100644 --- a/Language/Reference/User-Interface-Help/hide-method.md +++ b/Language/Reference/User-Interface-Help/hide-method.md @@ -16,10 +16,14 @@ ms.date: 06/08/2017 Hides an object but doesn't unload it. - **Syntax** - _object_. **Hide** + +## Syntax + +_object_. **Hide** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. If _object_ is omitted, the **UserForm** with the[focus](../../Glossary/vbe-glossary.md) is assumed to be _object_. - **Remarks** + +## Remarks + When an object is hidden, it's removed from the screen and its **Visible** property is set to **False**. A hidden object's controls aren't accessible to the user, but they are available programmatically to the running application, to other processes that may be communicating with the application through Automation, and in Windows, to **Timer** control events. When a **UserForm** is hidden, the user can't interact with the application until all code in the event procedure that caused the **UserForm** to be hidden has finished executing. If the **UserForm** isn't loaded when the **Hide** method is invoked, the **Hide** method loads the **UserForm** but doesn't display it. diff --git a/Language/Reference/User-Interface-Help/hideselection-property.md b/Language/Reference/User-Interface-Help/hideselection-property.md index d9598aa2215..f4250067d03 100644 --- a/Language/Reference/User-Interface-Help/hideselection-property.md +++ b/Language/Reference/User-Interface-Help/hideselection-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether selected text remains highlighted when a control does not have the [focus](../../Glossary/vbe-glossary.md). - **Syntax** - _object_. **HideSelection** [= _Boolean_ ] + +## Syntax + +_object_. **HideSelection** [= _Boolean_ ] The **HideSelection** property syntax has these parts: @@ -35,6 +37,7 @@ The settings for _Boolean_ are: |**True**|Selected text is not highlighted unless the control has the focus (default).| |**False**|Selected text always appears highlighted.| - **Remarks** +## Remarks + You can use the **HideSelection** property to maintain highlighted text when another form or a dialog box receives the focus, such as in a spell-checking procedure. diff --git a/Language/Reference/User-Interface-Help/hour-function.md b/Language/Reference/User-Interface-Help/hour-function.md index cd3dbe1d49b..47e2532a1ea 100644 --- a/Language/Reference/User-Interface-Help/hour-function.md +++ b/Language/Reference/User-Interface-Help/hour-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Integer**) specifying a whole number between 0 and 23, inclusive, representing the hour of the day. - **Syntax** - **Hour(**_time_**)** + +## Syntax + +**Hour(**_time_**)** The required _time_[argument](../../Glossary/vbe-glossary.md) is any[Variant](../../Glossary/vbe-glossary.md), [numeric expression](../../Glossary/vbe-glossary.md), [string expression](../../Glossary/vbe-glossary.md), or any combination, that can represent a time. If _time_ contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned. ## Example diff --git a/Language/Reference/User-Interface-Help/ifthenelse-directive.md b/Language/Reference/User-Interface-Help/ifthenelse-directive.md index 722662fa157..c541976102f 100644 --- a/Language/Reference/User-Interface-Help/ifthenelse-directive.md +++ b/Language/Reference/User-Interface-Help/ifthenelse-directive.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Conditionally compiles selected blocks of Visual Basic code. - **Syntax** +## Syntax - **#If** _expression_ **Then** +**#If** _expression_ **Then** _statements_ [ **#ElseIf** _expression-n_ **Then** [ _elseifstatements_ ]] @@ -33,7 +33,8 @@ The **#If...Then...#Else** directive syntax has these parts: | _elseifstatements_|Optional. One or more program lines or compiler directives that are evaluated if _expression-n_ is **True**.| | _elsestatements_|Optional. One or more program lines or compiler directives that are evaluated if no previous _expression_ or _expression-n_ is **True**.| - **Remarks** +## Remarks + The behavior of the **#If...Then...#Else** directive is the same as the **If...Then...Else** statement, except that there is no single-line form of the **#If**, **#Else**, **#ElseIf**, and **#End If** directives; that is, no other code can appear on the same line as any of the directives. Conditional compilation is typically used to compile the same program for different platforms. It is also used to prevent debugging code from appearing in an executable file. Code excluded during conditional compilation is completely omitted from the final executable file, so it has no size or performance effect. Regardless of the outcome of any evaluation, all expressions are evaluated. Therefore, all [constants](../../Glossary/vbe-glossary.md) used in expressions must be defined — any undefined constant evaluates as[Empty](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/ifthenelse-statement.md b/Language/Reference/User-Interface-Help/ifthenelse-statement.md index bf828d3e94d..403b3ffde83 100644 --- a/Language/Reference/User-Interface-Help/ifthenelse-statement.md +++ b/Language/Reference/User-Interface-Help/ifthenelse-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Conditionally executes a group of [statements](../../Glossary/vbe-glossary.md), depending on the value of an [expression](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **If**_condition_**Then** [ _statements_ ] [ **Else**_elsestatements_ ] +**If**_condition_**Then** [ _statements_ ] [ **Else**_elsestatements_ ] Or, you can use the block form syntax: **If**_condition_**Then** @@ -40,7 +40,8 @@ The **If...Then...Else** statement syntax has these parts: | _elseifstatements_|Optional. One or more statements executed if associated _condition-n_ is **True**.| | _elsestatements_|Optional. One or more statements executed if no previous _condition_ or _condition-n_ expression is **True**.| - **Remarks** +## Remarks + You can use the single-line form (first syntax) for short, simple tests. However, the block form (second syntax) provides more structure and flexibility than the single-line form and is usually easier to read, maintain, and debug. **Note** With the single-line form, it is possible to have multiple statements executed as the result of an **If...Then** decision. All statements must be on the same line and separated by colons, as in the following statement: diff --git a/Language/Reference/User-Interface-Help/iif-function.md b/Language/Reference/User-Interface-Help/iif-function.md index 6d6799a38d5..461362b05bc 100644 --- a/Language/Reference/User-Interface-Help/iif-function.md +++ b/Language/Reference/User-Interface-Help/iif-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns one of two parts, depending on the evaluation of an [expression](../../Glossary/vbe-glossary.md). - **Syntax** - **IIf( _expr_,** **_truepart_,** **_falsepart_ )** + +## Syntax + +**IIf( _expr_,** **_truepart_,** **_falsepart_ )** The **IIf** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,8 +27,9 @@ The **IIf** function syntax has these[named arguments](../../Glossary/vbe-gloss |**_truepart_**|Required. Value or expression returned if **_expr_** is **True**.| |**_falsepart_**|Required. Value or expression returned if **_expr_** is **False**.| - **Remarks** - **IIf** always evaluates both **_truepart_** and **_falsepart_**, even though it returns only one of them. Because of this, you should watch for undesirable side effects. For example, if evaluating **_falsepart_** results in a division by zero error, an error occurs even if **_expr_** is **True**. +## Remarks + +**IIf** always evaluates both **_truepart_** and **_falsepart_**, even though it returns only one of them. Because of this, you should watch for undesirable side effects. For example, if evaluating **_falsepart_** results in a division by zero error, an error occurs even if **_expr_** is **True**. ## Example diff --git a/Language/Reference/User-Interface-Help/image-control.md b/Language/Reference/User-Interface-Help/image-control.md index 1a9e68d2689..b08dd11847e 100644 --- a/Language/Reference/User-Interface-Help/image-control.md +++ b/Language/Reference/User-Interface-Help/image-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Displays a picture on a form. - **Remarks** + +## Remarks + The **Image** lets you display a picture as part of the data in a form. For example, you might use an **Image** to display employee photographs in a personnel form. The **Image** lets you crop, size, or zoom a picture, but does not allow you to edit the contents of the picture. For example, you cannot use the **Image** to change the colors in the picture, to make the picture[transparent](../../../language/Glossary/glossary-vba.md), or to refine the image of the picture. You must use image editing software for these purposes. The **Image** supports the following file formats: diff --git a/Language/Reference/User-Interface-Help/imemode-property.md b/Language/Reference/User-Interface-Help/imemode-property.md index 8ebae3ee5d1..9d022b922fd 100644 --- a/Language/Reference/User-Interface-Help/imemode-property.md +++ b/Language/Reference/User-Interface-Help/imemode-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the default [run time](../../Glossary/vbe-glossary.md) mode of the[Input Method Editor (IME](../../../language/Glossary/glossary-vba.md)) for a control. This property applies only to applications written for East Asia and is ignored in other applications. - **Syntax** - _object_. **IMEMode** [= _fmIMEMode_ ] + +## Syntax + +_object_. **IMEMode** [= _fmIMEMode_ ] The **IMEMode** property syntax has these parts: @@ -45,7 +47,9 @@ The settings for _fmIMEMode_ are: | _fmIMEModeHangul_|10|IME on with Half-width Hangul mode.| The **fmIMEModeNoControl** setting indicates that the mode of the IME does not change when the control receives[focus](../../Glossary/vbe-glossary.md) at run time. For any other value, the mode of the IME is set to the value specified by the **IMEMode** property when the control receives focus at run time. - **Remarks** + +## Remarks + There are two ways to set the mode of the IME. One is through the toolbar of the IME. The other is with the **IMEMode** property of a control, which sets or returns the current mode of the IME. This property allows dynamic control of the IME through code. The following example explains how **IMEMode** interacts with the toolbar of the IME. Assume that you have designed a form with TextBox1 and CheckBox1. You have set TextBox1.IMEMode to 0, and you have set CheckBox1.IMEMode to 1. While in design mode you have used the IME toolbar to put the IME in mode 2. When you run the form, the IME begins in mode 2. If you click TextBox1, the IME mode does not change because **IMEMode** for this control is 0. If you click CheckBox1, the IME changes to mode 1, because **IMEMode** for this control is 1. If you click again on TextBox1, the IME remains in mode 1 (**IMEMode** is 0, so the IME retains its last setting). diff --git a/Language/Reference/User-Interface-Help/imestatus-function.md b/Language/Reference/User-Interface-Help/imestatus-function.md index 0acd5f6f988..7118f35d71f 100644 --- a/Language/Reference/User-Interface-Help/imestatus-function.md +++ b/Language/Reference/User-Interface-Help/imestatus-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns an [Integer](../../Glossary/vbe-glossary.md) specifying the current Input Method Editor (IME) mode of Microsoft Windows; available in East Asian versions only. - **Syntax** - **IMEStatus** + +## Syntax + +**IMEStatus** **Return Values** The return values for the Japanese [locale](../../Glossary/vbe-glossary.md) are as follows: diff --git a/Language/Reference/User-Interface-Help/imp-operator.md b/Language/Reference/User-Interface-Help/imp-operator.md index f9f6f632ef2..30730bcc7e0 100644 --- a/Language/Reference/User-Interface-Help/imp-operator.md +++ b/Language/Reference/User-Interface-Help/imp-operator.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to perform a logical implication on two [expressions](../../Glossary/vbe-glossary.md). - **Syntax** - _result_**=**_expression1_ **Imp** _expression2_. + +## Syntax + +_result_**=**_expression1_ **Imp** _expression2_. The **Imp** operator syntax has these parts: @@ -25,7 +27,8 @@ The **Imp** operator syntax has these parts: | _expression1_|Required; any expression.| | _expression2_|Required; any expression.| - **Remarks** +## Remarks + The following table illustrates how _result_ is determined: diff --git a/Language/Reference/User-Interface-Help/implements-statement.md b/Language/Reference/User-Interface-Help/implements-statement.md index b5903663e68..e6fc9f60d55 100644 --- a/Language/Reference/User-Interface-Help/implements-statement.md +++ b/Language/Reference/User-Interface-Help/implements-statement.md @@ -12,12 +12,13 @@ ms.date: 06/08/2017 Specifies an interface or class that will be implemented in the [class module](../../Glossary/vbe-glossary.md) in which it appears. - **Syntax** +## Syntax - **Implements** [ _InterfaceName_ | _Class_ ] +**Implements** [ _InterfaceName_ | _Class_ ] The required _InterfaceName_ or _Class_ is the name of an interface or [class](../../Glossary/vbe-glossary.md) in a [type library](../../Glossary/vbe-glossary.md) whose methods will be implemented by the corresponding methods in the Visual Basic class. -**Remarks** +## Remarks + An interface is a collection of prototypes representing the members (methods and properties) the interface encapsulates; that is, it contains only the declarations for the member procedures. A class provides an implementation of all of the methods and properties of one or more interfaces. Classes provide the code used when each function is called by a controller of the class. All classes implement at least one interface, which is considered the default interface of the class. In Visual Basic, any member that isn't explicitly a member of an implemented interface is implicitly a member of the default interface. When a Visual Basic class implements an interface, the Visual Basic class provides its own versions of all the **Public** [procedures](../../Glossary/vbe-glossary.md) specified in the type library of the Interface. In addition to providing a mapping between the interface prototypes and your procedures, the **Implements** statement causes the class to accept COM QueryInterface calls for the specified interface ID. diff --git a/Language/Reference/User-Interface-Help/import-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/import-method-vba-add-in-object-model.md index 17fcfc0ca55..ce171355b16 100644 --- a/Language/Reference/User-Interface-Help/import-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/import-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Adds a component to a [project](../../Glossary/vbe-glossary.md) from a file; returns the newly added component. - **Syntax** - _object_**.Import(**_filename_**) As VBComponent** + +## Syntax + +_object_**.Import(**_filename_**) As VBComponent** The **Import** syntax has these parts: @@ -24,6 +26,7 @@ The **Import** syntax has these parts: | _object_|Required. An [object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list.| | _filename_|Required. A [String](../../Glossary/vbe-glossary.md) specifying path and file name of the component that you want to import the component from.| - **Remarks** +## Remarks + You can use the **Import** method to add a component,[form](../../Glossary/vbe-glossary.md), [module](../../Glossary/vbe-glossary.md), [class](../../Glossary/vbe-glossary.md), and so on, to your project. diff --git a/Language/Reference/User-Interface-Help/index-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/index-property-microsoft-forms.md index 2a17b555a69..23cc171b7e1 100644 --- a/Language/Reference/User-Interface-Help/index-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/index-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 The position of a **Tab** object within a **Tabs** collection or a **Page** object in a **Pages** collection. - **Syntax** - _object_. **Index** [= _Integer_ ] + +## Syntax + +_object_. **Index** [= _Integer_ ] The **Index** property syntax has these parts: @@ -24,7 +26,8 @@ The **Index** property syntax has these parts: | _object_|Required. A valid object.| | _Integer_|Optional. The index of the currently selected **Tab** object.| - **Remarks** +## Remarks + The **Index** property specifies the order in which tabs appear. Changing the value of **Index** visually changes the order of **Pages** in a **MultiPage** or **Tabs** on a **TabStrip**. The index value for the first page or tab is zero, the index value of the second page or tab is one, and so on. In a **MultiPage**, **Index** refers to a **Page** as well as the page's **Tab**. In a **TabStrip**, **Index** refers to the tab only. diff --git a/Language/Reference/User-Interface-Help/indexedvalue-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/indexedvalue-property-vba-add-in-object-model.md index bd99e63f1b3..a4c87fe53ad 100644 --- a/Language/Reference/User-Interface-Help/indexedvalue-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/indexedvalue-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a value for a member of a [property](../../Glossary/vbe-glossary.md) that is an indexed list or an[array](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + The value returned or set by the **IndexedValue** property is an[expression](../../Glossary/vbe-glossary.md) that evaluates to a type that is accepted by the object. For a property that is an indexed list or array, you must use the **IndexedValue** property instead of the **Value** property. An indexed list is a[numeric expression](../../Glossary/vbe-glossary.md) specifying index position. **IndexedValue** accepts up to 4 indices. The number of indices accepted by **IndexedValue** is the value returned by the **NumIndices** property. The **IndexedValue** property is used only if the value of the **NumIndices** property is greater than zero. Values in indexed lists are set or returned with a single index. diff --git a/Language/Reference/User-Interface-Help/initialize-event.md b/Language/Reference/User-Interface-Help/initialize-event.md index 4e2a66e4198..6d2619588a9 100644 --- a/Language/Reference/User-Interface-Help/initialize-event.md +++ b/Language/Reference/User-Interface-Help/initialize-event.md @@ -16,10 +16,14 @@ ms.date: 06/08/2017 Occurs after an object is loaded, but before it's shown. - **Syntax** - **Private Sub**_object_**_Initialize()** + +## Syntax + +**Private Sub**_object_**_Initialize()** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + The Initialize event is typically used to prepare an application or **UserForm** for use.[Variables](../../Glossary/vbe-glossary.md) are assigned initial values, and controls may be moved or resized to accommodate initialization data. ## Example diff --git a/Language/Reference/User-Interface-Help/input-function.md b/Language/Reference/User-Interface-Help/input-function.md index 2609753c713..2372f4bf0f8 100644 --- a/Language/Reference/User-Interface-Help/input-function.md +++ b/Language/Reference/User-Interface-Help/input-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns [String](../../Glossary/vbe-glossary.md) containing characters from a file opened in **Input** or **Binary** mode. - **Syntax** - **Input(**_number_, [ **#** ] _filenumber_ ) + +## Syntax + +**Input(**_number_, [ **#** ] _filenumber_ ) The **Input** function syntax has these parts: @@ -24,7 +26,8 @@ The **Input** function syntax has these parts: | _number_|Required. Any valid [numeric expression](../../Glossary/vbe-glossary.md) specifying the number of characters to return.| | _filenumber_|Required. Any valid [file number](../../Glossary/vbe-glossary.md).| - **Remarks** +## Remarks + Data read with the **Input** function is usually written to a file with **Print #** or **Put**. Use this function only with files opened in **Input** or **Binary** mode. Unlike the **Input #** statement, the **Input** function returns all of the characters it reads, including commas, carriage returns, linefeeds, quotation marks, and leading spaces. With files opened for **Binary** access, an attempt to read through the file using the **Input** function until **EOF** returns **True** generates an error. Use the **LOF** and **Loc** functions instead of **EOF** when reading binary files with **Input**, or use **Get** when using the **EOF** function. diff --git a/Language/Reference/User-Interface-Help/inputbox-function.md b/Language/Reference/User-Interface-Help/inputbox-function.md index cf02de3168f..e5e2bfd125c 100644 --- a/Language/Reference/User-Interface-Help/inputbox-function.md +++ b/Language/Reference/User-Interface-Help/inputbox-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a [String](../../Glossary/vbe-glossary.md) containing the contents of the text box. - **Syntax** - **InputBox( _prompt_** [, **_title_** ] [, **_default_** ] [, **_xpos_** ] [, **_ypos_** ] [, **_helpfile_**, **_context_** ] **)** + +## Syntax + +**InputBox( _prompt_** [, **_title_** ] [, **_default_** ] [, **_xpos_** ] [, **_ypos_** ] [, **_helpfile_**, **_context_** ] **)** The **InputBox** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -29,7 +31,8 @@ The **InputBox** function syntax has these[named arguments](../../Glossary/vbe- |**_helpfile_**|Optional. String expression that identifies the Help file to use to provide context-sensitive Help for the dialog box. If **_helpfile_** is provided, **_context_** must also be provided.| |**_context_**|Optional. Numeric expression that is the Help context number assigned to the appropriate Help topic by the Help author. If **_context_** is provided, **_helpfile_** must also be provided.| - **Remarks** +## Remarks + When both **_helpfile_** and **_context_** are provided, the user can press F1 (Windows) or HELP (Macintosh) to view the Help topic corresponding to the **_context_**. Some[host applications](../../Glossary/vbe-glossary.md), for example, Microsoft Excel, also automatically add a **Help** button to the dialog box. If the user clicks **OK** or presses ENTER , the **InputBox** function returns whatever is in the text box. If the user clicks **Cancel**, the function returns a zero-length string (""). **Note** To specify more than the first named argument, you must use **InputBox** in an[expression](../../Glossary/vbe-glossary.md). To omit some positional [arguments](../../Glossary/vbe-glossary.md), you must include the corresponding comma delimiter. diff --git a/Language/Reference/User-Interface-Help/inputstatement.md b/Language/Reference/User-Interface-Help/inputstatement.md index b7fdcba1271..7a9b7d342f4 100644 --- a/Language/Reference/User-Interface-Help/inputstatement.md +++ b/Language/Reference/User-Interface-Help/inputstatement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Reads data from an open sequential file and assigns the data to [variables](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **Input** **#**_filenumber, varlist_ +**Input** **#**_filenumber, varlist_ The **Input #** statement syntax has these parts: @@ -25,7 +25,8 @@ The **Input #** statement syntax has these parts: | _filenumber_|Required. Any valid [file number](../../Glossary/vbe-glossary.md).| | _varlist_|Required. Comma-delimited list of variables that are assigned values read from the file — can't be an [array](../../Glossary/vbe-glossary.md) or[object variable](../../Glossary/vbe-glossary.md). However, variables that describe an element of an array or [user-defined type](../../Glossary/vbe-glossary.md) may be used.| - **Remarks** +## Remarks + Data read with **Input #** is usually written to a file with **Write #**. Use this[statement](../../Glossary/vbe-glossary.md) only with files opened in **Input** or **Binary** mode. When read, standard string or numeric data is assigned to variables without modification. The following table illustrates how other input data is treated: diff --git a/Language/Reference/User-Interface-Help/insertlines-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/insertlines-method-vba-add-in-object-model.md index 48dd7a9e410..f6703f8308f 100644 --- a/Language/Reference/User-Interface-Help/insertlines-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/insertlines-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Inserts a line or lines of code at a specified location in a block of code. - **Syntax** - _object_**.InsertLines(**_line_, _code_**)** + +## Syntax + +_object_**.InsertLines(**_line_, _code_**)** The **InsertLines** syntax has these parts: @@ -25,6 +27,7 @@ The **InsertLines** syntax has these parts: | _line_|Required. A [Long](../../Glossary/vbe-glossary.md) specifying the location at which you want to insert the code.| | _code_|Required. A [String](../../Glossary/vbe-glossary.md) containing the code you want to insert.| - **Remarks** +## Remarks + If the text you insert using the **InsertLines** method is carriage return-linefeed delimited, it will be inserted as consecutive lines. diff --git a/Language/Reference/User-Interface-Help/insideheight-insidewidth-properties.md b/Language/Reference/User-Interface-Help/insideheight-insidewidth-properties.md index 68dfe489269..79b9e00354e 100644 --- a/Language/Reference/User-Interface-Help/insideheight-insidewidth-properties.md +++ b/Language/Reference/User-Interface-Help/insideheight-insidewidth-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 **InsideHeight** returns the height, in[points](../../Glossary/vbe-glossary.md), of the [client region](../../../language/Glossary/glossary-vba.md) inside a form. **InsideWidth** returns the width, in points, of the client region inside a form. - **Syntax** - _object_. **InsideHeight** + +## Syntax + +_object_. **InsideHeight** _object_. **InsideWidth** The **InsideHeight** and **InsideWidth** property syntaxes have these parts: @@ -24,6 +26,7 @@ The **InsideHeight** and **InsideWidth** property syntaxes have these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The **InsideHeight** and **InsideWidth** properties are read-only. If the region includes a scroll bar, the returned value does not include the height or width of the scroll bar. diff --git a/Language/Reference/User-Interface-Help/instr-function.md b/Language/Reference/User-Interface-Help/instr-function.md index b5bf9c335f2..208d0e514ed 100644 --- a/Language/Reference/User-Interface-Help/instr-function.md +++ b/Language/Reference/User-Interface-Help/instr-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Long**) specifying the position of the first occurrence of one string within another. - **Syntax** - **InStr** ([ _start_, ] _string1_, _string2_ [, _compare_ ]) + +## Syntax + +**InStr** ([ _start_, ] _string1_, _string2_ [, _compare_ ]) The **InStr** function syntax has these[arguments](../../Glossary/vbe-glossary.md): @@ -50,7 +52,8 @@ The _compare_ argument settings are: |**_string2_** is found within **_string1_**|Position at which match is found| |**_start_** > **_string2_**|0| - **Remarks** +## Remarks + The **InStrB** function is used with byte data contained in a string. Instead of returning the character position of the first occurrence of one string within another, **InStrB** returns the byte position. ## Example diff --git a/Language/Reference/User-Interface-Help/instrrev-function.md b/Language/Reference/User-Interface-Help/instrrev-function.md index 6a4eeb247b6..4c8915a2b4f 100644 --- a/Language/Reference/User-Interface-Help/instrrev-function.md +++ b/Language/Reference/User-Interface-Help/instrrev-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns the position of an occurrence of one string within another, from the end of string. - **Syntax** - **InstrRev( _stringcheck_,** **_stringmatch_** [ **,** **_start_** [ **,** **_compare_** ]] **)** + +## Syntax + +**InstrRev( _stringcheck_,** **_stringmatch_** [ **,** **_start_** [ **,** **_compare_** ]] **)** The **InstrRev** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -52,6 +54,7 @@ The **_compare_** argument can have the following values: |**_stringmatch_** is found within **_stringcheck_**|Position at which match is found| |**_start_** > **Len( _stringmatch_ )**|0| - **Remarks** +## Remarks + Note that the syntax for the **InstrRev** function is not the same as the syntax for the **Instr** function. diff --git a/Language/Reference/User-Interface-Help/int-fix-functions.md b/Language/Reference/User-Interface-Help/int-fix-functions.md index 7b46f74fc0a..3143854c4cf 100644 --- a/Language/Reference/User-Interface-Help/int-fix-functions.md +++ b/Language/Reference/User-Interface-Help/int-fix-functions.md @@ -14,11 +14,15 @@ ms.date: 06/08/2017 Returns the integer portion of a number. - **Syntax** - **Int(**_number_**)** + +## Syntax + +**Int(**_number_**)** **Fix(**_number_**)** The required _number_[argument](../../Glossary/vbe-glossary.md) is a[Double](../../Glossary/vbe-glossary.md) or any valid[numeric expression](../../Glossary/vbe-glossary.md). If _number_ contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned. - **Remarks** + +## Remarks + Both **Int** and **Fix** remove the fractional part of _number_ and return the resulting integer value. The difference between **Int** and **Fix** is that if _number_ is negative, **Int** returns the first negative integer less than or equal to _number,_ whereas **Fix** returns the first negative integer greater than or equal to _number._ For example, **Int** converts -8.4 to -9, and **Fix** converts -8.4 to -8. **Fix(**_number_**)** is equivalent to: diff --git a/Language/Reference/User-Interface-Help/integralheight-property.md b/Language/Reference/User-Interface-Help/integralheight-property.md index 2c431c12ccd..c7889de48aa 100644 --- a/Language/Reference/User-Interface-Help/integralheight-property.md +++ b/Language/Reference/User-Interface-Help/integralheight-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Indicates whether a **ListBox** or **TextBox** displays full lines of text in a list or partial lines. - **Syntax** - _object_. **IntegralHeight** [= _Boolean_ ] + +## Syntax + +_object_. **IntegralHeight** [= _Boolean_ ] The **IntegralHeight** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|The list resizes itself to display only complete items (default).| |**False**|The list does not resize itself even if the item is too tall to display completely.| - **Remarks** +## Remarks + The **IntegralHeight** property relates to the height of the list, just as the **AutoSize** property relates to the width of the list. If **IntegralHeight** is **True**, the list box automatically resizes when necessary to show full rows. If **False**, the list remains a fixed size; if items are taller than the available space in the list, the entire item is not shown. diff --git a/Language/Reference/User-Interface-Help/ipmt-function.md b/Language/Reference/User-Interface-Help/ipmt-function.md index 4414f092885..10995b654e3 100644 --- a/Language/Reference/User-Interface-Help/ipmt-function.md +++ b/Language/Reference/User-Interface-Help/ipmt-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the interest payment for a given period of an annuity based on periodic, fixed payments and a fixed interest rate. - **Syntax** - **IPmt( _rate_**, **_per_**, **_nper_**, **_pv_** [, **_fv_** [, **_type_** ]] **)** + +## Syntax + +**IPmt( _rate_**, **_per_**, **_nper_**, **_pv_** [, **_fv_** [, **_type_** ]] **)** The **IPmt** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -28,7 +30,8 @@ The **IPmt** function has these[named arguments](../../Glossary/vbe-glossary.md) |**_fv_**|Optional. [Variant](../../Glossary/vbe-glossary.md) specifying future value or cash balance you want after you've made the final payment. For example, the future value of a loan is $0 because that's its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.| |**_type_**|Optional. **Variant** specifying when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.| - **Remarks** +## Remarks + An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan). The **_rate_** and **_nper_**[arguments](../../Glossary/vbe-glossary.md) must be calculated using payment periods expressed in the same units. For example, if **_rate_** is calculated using months, **_nper_** must also be calculated using months. For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers. diff --git a/Language/Reference/User-Interface-Help/irr-function.md b/Language/Reference/User-Interface-Help/irr-function.md index 5aca50c6256..3c7bbfb18ae 100644 --- a/Language/Reference/User-Interface-Help/irr-function.md +++ b/Language/Reference/User-Interface-Help/irr-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the internal rate of return for a series of periodic cash flows (payments and receipts). - **Syntax** - **IRR( _values_ ()** [, **_guess_** ] **)** + +## Syntax + +**IRR( _values_ ()** [, **_guess_** ] **)** The **IRR** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -24,7 +26,8 @@ The **IRR** function has these[named arguments](../../Glossary/vbe-glossary.md) |**_values_ ()**|Required. [Array](../../Glossary/vbe-glossary.md) of **Double** specifying cash flow values. The array must contain at least one negative value (a payment) and one positive value (a receipt).| |**_guess_**|Optional. [Variant](../../Glossary/vbe-glossary.md) specifying value you estimate will be returned by **IRR**. If omitted, **_guess_** is 0.1 (10 percent).| - **Remarks** +## Remarks + The internal rate of return is the interest rate received for an investment consisting of payments and receipts that occur at regular intervals. The **IRR** function uses the order of values within the array to interpret the order of payments and receipts. Be sure to enter your payment and receipt values in the correct sequence. The cash flow for each period doesn't have to be fixed, as it is for an annuity. **IRR** is calculated by iteration. Starting with the value of **_guess_**, **IRR** cycles through the calculation until the result is accurate to within 0.00001 percent. If **IRR** can't find a result after 20 tries, it fails. diff --git a/Language/Reference/User-Interface-Help/is-operator.md b/Language/Reference/User-Interface-Help/is-operator.md index 360cd27a118..fa3320169a6 100644 --- a/Language/Reference/User-Interface-Help/is-operator.md +++ b/Language/Reference/User-Interface-Help/is-operator.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to compare two object reference [variables](../../Glossary/vbe-glossary.md). - **Syntax** - _result_**=**_object1_**Is**_object2_ + +## Syntax + +_result_**=**_object1_**Is**_object2_ The **Is** operator syntax has these parts: @@ -25,7 +27,8 @@ The **Is** operator syntax has these parts: | _object1_|Required; any object name.| | _object2_|Required; any object name.| - **Remarks** +## Remarks + If _object1_ and _object2_ both refer to the same object, _result_ is **True**; if they do not, _result_ is **False**. Two variables can be made to refer to the same object in several ways. In the following example, A has been set to refer to the same object as B: diff --git a/Language/Reference/User-Interface-Help/isarray-function.md b/Language/Reference/User-Interface-Help/isarray-function.md index 5c84b300db6..7ca1094b81a 100644 --- a/Language/Reference/User-Interface-Help/isarray-function.md +++ b/Language/Reference/User-Interface-Help/isarray-function.md @@ -14,11 +14,15 @@ ms.date: 06/08/2017 Returns a **Boolean** value indicating whether a[variable](../../Glossary/vbe-glossary.md) is an[array](../../Glossary/vbe-glossary.md). - **Syntax** - **IsArray(**_varname_**)** + +## Syntax + +**IsArray(**_varname_**)** The required _varname_[argument](../../Glossary/vbe-glossary.md) is an[identifier](../../Glossary/vbe-glossary.md) specifying a variable. - **Remarks** - **IsArray** returns **True** if the variable is an array; otherwise, it returns **False**. **IsArray** is especially useful with[variants](../../Glossary/vbe-glossary.md) containing arrays. + +## Remarks + +**IsArray** returns **True** if the variable is an array; otherwise, it returns **False**. **IsArray** is especially useful with[variants](../../Glossary/vbe-glossary.md) containing arrays. ## Example diff --git a/Language/Reference/User-Interface-Help/isdate-function.md b/Language/Reference/User-Interface-Help/isdate-function.md index d3d99d06d47..3e805e03f3d 100644 --- a/Language/Reference/User-Interface-Help/isdate-function.md +++ b/Language/Reference/User-Interface-Help/isdate-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns **True** if the expression is a date or is recognizable as a valid date or time; otherwise, it returns **False**. - **Syntax** - **IsDate(**_expression_**)** + +## Syntax + +**IsDate(**_expression_**)** The required _expression_[argument](../../Glossary/vbe-glossary.md) is a[Variant](../../Glossary/vbe-glossary.md) containing a[date expression](../../Glossary/vbe-glossary.md) or[string expression](../../Glossary/vbe-glossary.md) recognizable as a date or time. - **Remarks** + +## Remarks + In Microsoft Windows, the range of valid dates is January 1, 100 A.D. through December 31, 9999 A.D.; the ranges vary among operating systems. ## Example diff --git a/Language/Reference/User-Interface-Help/isempty-function.md b/Language/Reference/User-Interface-Help/isempty-function.md index 3404275bd75..b18588a482f 100644 --- a/Language/Reference/User-Interface-Help/isempty-function.md +++ b/Language/Reference/User-Interface-Help/isempty-function.md @@ -14,11 +14,15 @@ ms.date: 06/08/2017 Returns a **Boolean** value indicating whether a[variable](../../Glossary/vbe-glossary.md) has been initialized. - **Syntax** - **IsEmpty(**_expression_**)** + +## Syntax + +**IsEmpty(**_expression_**)** The required _expression_[argument](../../Glossary/vbe-glossary.md) is a[Variant](../../Glossary/vbe-glossary.md) containing a[numeric](../../Glossary/vbe-glossary.md) or[string expression](../../Glossary/vbe-glossary.md). However, because **IsEmpty** is used to determine if individual variables are initialized, the _expression_ argument is most often a single variable name. - **Remarks** - **IsEmpty** returns **True** if the variable is uninitialized, or is explicitly set to[Empty](../../Glossary/vbe-glossary.md); otherwise, it returns **False**. **False** is always returned if _expression_ contains more than one variable. **IsEmpty** only returns meaningful information for[variants](../../Glossary/vbe-glossary.md). + +## Remarks + +**IsEmpty** returns **True** if the variable is uninitialized, or is explicitly set to[Empty](../../Glossary/vbe-glossary.md); otherwise, it returns **False**. **False** is always returned if _expression_ contains more than one variable. **IsEmpty** only returns meaningful information for[variants](../../Glossary/vbe-glossary.md). ## Example diff --git a/Language/Reference/User-Interface-Help/iserror-function.md b/Language/Reference/User-Interface-Help/iserror-function.md index eae80c83b8b..82f2157e210 100644 --- a/Language/Reference/User-Interface-Help/iserror-function.md +++ b/Language/Reference/User-Interface-Help/iserror-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Boolean** value indicating whether an[expression](../../Glossary/vbe-glossary.md) is an error value. - **Syntax** - **IsError(**_expression_**)** + +## Syntax + +**IsError(**_expression_**)** The required _expression_[argument](../../Glossary/vbe-glossary.md) can be any valid expression. - **Remarks** + +## Remarks + Error values are created by converting real numbers to error values using the **CVErr** function. The **IsError** function is used to determine if a[numeric expression](../../Glossary/vbe-glossary.md) represents an error. **IsError** returns **True** if the _expression_ argument indicates an error; otherwise, it returns **False**. ## Example diff --git a/Language/Reference/User-Interface-Help/ismissing-function.md b/Language/Reference/User-Interface-Help/ismissing-function.md index fb5e7d3508f..8246a2a3c56 100644 --- a/Language/Reference/User-Interface-Help/ismissing-function.md +++ b/Language/Reference/User-Interface-Help/ismissing-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Boolean** value indicating whether an optional **Variant**[argument](../../Glossary/vbe-glossary.md) has been passed to a[procedure](../../Glossary/vbe-glossary.md). - **Syntax** - **IsMissing(**_argname_**)** + +## Syntax + +**IsMissing(**_argname_**)** The required _argname_ argument contains the name of an optional **Variant** procedure argument. - **Remarks** + +## Remarks + Use the **IsMissing** function to detect whether or not optional **Variant** arguments have been provided in calling a procedure. **IsMissing** returns **True** if no value has been passed for the specified argument; otherwise, it returns **False**. If **IsMissing** returns **True** for an argument, use of the missing argument in other code may cause a user-defined error. If **IsMissing** is used on a **ParamArray** argument, it always returns **False**. To detect an empty **ParamArray**, test to see if the[array's](../../Glossary/vbe-glossary.md) upper bound is less than its lower bound. **Note** **IsMissing** does not work on simple data types (such as **Integer** or **Double**) because, unlike **Variants**, they don't have a provision for a "missing" flag bit. Because of this, the syntax for typed optional arguments allows you to specify a default value. If the argument is omitted when the procedure is called, then the argument will have this default value, as in the example below: diff --git a/Language/Reference/User-Interface-Help/isnull-function.md b/Language/Reference/User-Interface-Help/isnull-function.md index d9fb8a91ab0..d8afd6a5986 100644 --- a/Language/Reference/User-Interface-Help/isnull-function.md +++ b/Language/Reference/User-Interface-Help/isnull-function.md @@ -14,11 +14,15 @@ ms.date: 06/08/2017 Returns a **Boolean** value that indicates whether an[expression](../../Glossary/vbe-glossary.md) contains no valid data ([Null](../../Glossary/vbe-glossary.md)). - **Syntax** - **IsNull(**_expression_**)** + +## Syntax + +**IsNull(**_expression_**)** The required _expression_[argument](../../Glossary/vbe-glossary.md) is a[Variant](../../Glossary/vbe-glossary.md) containing a[numeric expression](../../Glossary/vbe-glossary.md) or[string expression](../../Glossary/vbe-glossary.md). - **Remarks** - **IsNull** returns **True** if _expression_ is **Null**; otherwise, **IsNull** returns **False**. If _expression_ consists of more than one[variable](../../Glossary/vbe-glossary.md), **Null** in any constituent variable causes **True** to be returned for the entire expression. + +## Remarks + +**IsNull** returns **True** if _expression_ is **Null**; otherwise, **IsNull** returns **False**. If _expression_ consists of more than one[variable](../../Glossary/vbe-glossary.md), **Null** in any constituent variable causes **True** to be returned for the entire expression. The **Null** value indicates that the **Variant** contains no valid data. **Null** is not the same as[Empty](../../Glossary/vbe-glossary.md), which indicates that a variable has not yet been initialized. It is also not the same as a zero-length string (""), which is sometimes referred to as a null string. diff --git a/Language/Reference/User-Interface-Help/isnumeric-function.md b/Language/Reference/User-Interface-Help/isnumeric-function.md index b50d179ff50..d0b56e7f69a 100644 --- a/Language/Reference/User-Interface-Help/isnumeric-function.md +++ b/Language/Reference/User-Interface-Help/isnumeric-function.md @@ -21,9 +21,9 @@ Returns a **Boolean** value indicating whether an [expression](../../Glossary/v The required _expression_ [argument](../../Glossary/vbe-glossary.md) is a [Variant](../../Glossary/vbe-glossary.md) containing a [numeric expression](../../Glossary/vbe-glossary.md) or [string expression](../../Glossary/vbe-glossary.md). - **Remarks** - - **IsNumeric** returns **True** if the entire _expression_ is recognized as a number; otherwise, it returns **False**. +## Remarks + +**IsNumeric** returns **True** if the entire _expression_ is recognized as a number; otherwise, it returns **False**. **IsNumeric** returns **False** if _expression_ is a [date expression](../../Glossary/vbe-glossary.md). ## Example diff --git a/Language/Reference/User-Interface-Help/isobject-function.md b/Language/Reference/User-Interface-Help/isobject-function.md index 801411d412e..ab1021ec698 100644 --- a/Language/Reference/User-Interface-Help/isobject-function.md +++ b/Language/Reference/User-Interface-Help/isobject-function.md @@ -14,11 +14,15 @@ ms.date: 06/08/2017 Returns a **Boolean** value indicating whether an [identifier](../../Glossary/vbe-glossary.md) represents an object [variable](../../Glossary/vbe-glossary.md). - **Syntax** - **IsObject(**_identifier_**)** + +## Syntax + +**IsObject(**_identifier_**)** The required _identifier_ [argument](../../Glossary/vbe-glossary.md) is a variable name. - **Remarks** - **IsObject** is useful only in determining whether a [Variant](../../Glossary/vbe-glossary.md) is of **VarType** **vbObject**. This could occur if the **Variant** actually references (or once referenced) an object, or if it contains **Nothing.** + +## Remarks + +**IsObject** is useful only in determining whether a [Variant](../../Glossary/vbe-glossary.md) is of **VarType** **vbObject**. This could occur if the **Variant** actually references (or once referenced) an object, or if it contains **Nothing.** **IsObject** returns **True** if _identifier_ is a variable declared with [Object](../../Glossary/vbe-glossary.md) type or any valid [class](../../Glossary/vbe-glossary.md) type, or if _identifier_ is a **Variant** of **VarType** **vbObject**, or a user-defined object; otherwise, it returns **False**. **IsObject** returns **True** even if the variable has been set to **Nothing**. Use error trapping to be sure that an object reference is valid. diff --git a/Language/Reference/User-Interface-Help/isready-property.md b/Language/Reference/User-Interface-Help/isready-property.md index 0c67d26d465..979d9053991 100644 --- a/Language/Reference/User-Interface-Help/isready-property.md +++ b/Language/Reference/User-Interface-Help/isready-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns **True** if the specified drive is ready; **False** if it is not. - **Syntax** + +## Syntax + object. **IsReady** The object is always a **Drive** object. - **Remarks** + +## Remarks + For removable-media drives and CD-ROM drives, **IsReady** returns **True** only when the appropriate media is inserted and ready for access. The following code illustrates the use of the **IsReady** property: diff --git a/Language/Reference/User-Interface-Help/isrootfolder-property.md b/Language/Reference/User-Interface-Help/isrootfolder-property.md index d2bb4cc8f90..be5ccd88bc1 100644 --- a/Language/Reference/User-Interface-Help/isrootfolder-property.md +++ b/Language/Reference/User-Interface-Help/isrootfolder-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns **True** if the specified folder is the root folder; **False** if it is not. - **Syntax** - _object_. **IsRootFolder** + +## Syntax + +_object_. **IsRootFolder** The _object_ is always a **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **IsRootFolder** property: diff --git a/Language/Reference/User-Interface-Help/item-method-microsoft-forms.md b/Language/Reference/User-Interface-Help/item-method-microsoft-forms.md index db81af48c4c..050c3e67fb9 100644 --- a/Language/Reference/User-Interface-Help/item-method-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/item-method-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a member of a [collection](../../Glossary/vbe-glossary.md), either by position or by name. - **Syntax** - **Set**_Object_ = _object_. **Item(**_collectionindex_**)** + +## Syntax + +**Set**_Object_ = _object_. **Item(**_collectionindex_**)** The **Item** method syntax has these parts: @@ -26,6 +28,8 @@ The **Item** method syntax has these parts: **Settings** The _collectionindex_ can be either a string or an integer. If it is a string, it must be a valid member name. If it is an integer, the minimum value is 0 and the maximum value is one less than the number of items in the collection. - **Remarks** + +## Remarks + If an invalid index or name is specified, an error occurs. diff --git a/Language/Reference/User-Interface-Help/item-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/item-method-vba-add-in-object-model.md index 51ae4008b21..348c267193f 100644 --- a/Language/Reference/User-Interface-Help/item-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/item-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns the indexed member of a [collection](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.Item(**_index_**)** + +## Syntax + +_object_**.Item(**_index_**)** The **Item** method syntax has these parts: @@ -37,7 +39,8 @@ The following table lists the collections and their corresponding _key_ argumen |**References**|**Name** property setting| |**Properties**|**Name** property setting| - **Remarks** +## Remarks + The _index_ argument can be a numeric value or a string containing the title of the object. diff --git a/Language/Reference/User-Interface-Help/item-method-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/item-method-visual-basic-for-applications.md index 8c71c3defa7..29a28618c85 100644 --- a/Language/Reference/User-Interface-Help/item-method-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/item-method-visual-basic-for-applications.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a specific [member](../../Glossary/vbe-glossary.md) of a **Collection** object either by position or by key. - **Syntax** - _object_**.Item(**_index_**)** + +## Syntax + +_object_**.Item(**_index_**)** The **Item** method syntax has the following object qualifier and part: @@ -24,7 +26,8 @@ The **Item** method syntax has the following object qualifier and part: | _object_|Required. An [object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list.| | _index_|Required. An [expression](../../Glossary/vbe-glossary.md) that specifies the position of a member of the[collection](../../Glossary/vbe-glossary.md). If a [numeric expression](../../Glossary/vbe-glossary.md), _index_ must be a number from 1 to the value of the collection's **Count** property. If a[string expression](../../Glossary/vbe-glossary.md), _index_ must correspond to the **_key_**[argument](../../Glossary/vbe-glossary.md) specified when the member referred to was added to the collection.| - **Remarks** +## Remarks + If the value provided as _index_ doesn't match any existing member of the collection, an error occurs. The **Item** method is the default method for a collection. Therefore, the following lines of code are equivalent: diff --git a/Language/Reference/User-Interface-Help/item-property-filesystemobject-object.md b/Language/Reference/User-Interface-Help/item-property-filesystemobject-object.md index 5efd6910796..bf4ca99adcd 100644 --- a/Language/Reference/User-Interface-Help/item-property-filesystemobject-object.md +++ b/Language/Reference/User-Interface-Help/item-property-filesystemobject-object.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Sets or returns an _item_ for a specified _key_ in a **Dictionary** object. For collections, returns an _item_ based on the specified _key_. Read/write. - **Syntax** - _object_. **Item(**_key_**)** [= _newitem_ ] + +## Syntax + +_object_. **Item(**_key_**)** [= _newitem_ ] The **Item** property has the following parts: @@ -26,6 +28,7 @@ The **Item** property has the following parts: | _key_|Required. _Key_ associated with the item being retrieved or added.| | _newitem_|Optional. Used for **Dictionary** object only; no application for collections. If provided, _newitem_ is the new value associated with the specified _key_.| - **Remarks** +## Remarks + If _key_ is not found when changing an _item_, a new _key_ is created with the specified _newitem_. If _key_ is not found when attempting to return an existing item, a new _key_ is created and its corresponding item is left empty. diff --git a/Language/Reference/User-Interface-Help/itemadded-event-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/itemadded-event-vba-add-in-object-model.md index f8ec7622896..824a5666d2b 100644 --- a/Language/Reference/User-Interface-Help/itemadded-event-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/itemadded-event-vba-add-in-object-model.md @@ -14,9 +14,13 @@ ms.date: 06/08/2017 Occurs after a reference is added. - **Syntax** - **Sub**_object_**_ItemAdded(ByVal**_item_**As Reference)** + +## Syntax + +**Sub**_object_**_ItemAdded(ByVal**_item_**As Reference)** The required _item_[argument](../../Glossary/vbe-glossary.md) specifies the item that was added. - **Remarks** + +## Remarks + The ItemAdded event occurs when a **Reference** is added to the **References** collection. diff --git a/Language/Reference/User-Interface-Help/itemremoved-event-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/itemremoved-event-vba-add-in-object-model.md index 00e61d5125e..f7ec8b46fb6 100644 --- a/Language/Reference/User-Interface-Help/itemremoved-event-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/itemremoved-event-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Occurs after a reference is removed from a [project](../../Glossary/vbe-glossary.md). - **Syntax** - **Sub**_object_**_ItemRemoved(ByVal**_item_**As Reference)** + +## Syntax + +**Sub**_object_**_ItemRemoved(ByVal**_item_**As Reference)** The required _item_[argument](../../Glossary/vbe-glossary.md) specifies the **Reference** that was removed. diff --git a/Language/Reference/User-Interface-Help/items-method.md b/Language/Reference/User-Interface-Help/items-method.md index a78c549e13d..30c478615a3 100644 --- a/Language/Reference/User-Interface-Help/items-method.md +++ b/Language/Reference/User-Interface-Help/items-method.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns an array containing all the items in a **Dictionary** object. - **Syntax** - _object_. **Items** + +## Syntax + +_object_. **Items** The _object_ is always the name of a **Dictionary** object. - **Remarks** + +## Remarks + The following code illustrates use of the **Items** method: diff --git a/Language/Reference/User-Interface-Help/join-function.md b/Language/Reference/User-Interface-Help/join-function.md index a3fbf45b89a..4aab04cb222 100644 --- a/Language/Reference/User-Interface-Help/join-function.md +++ b/Language/Reference/User-Interface-Help/join-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns a string created by joining a number of substrings contained in an [array](../../Glossary/vbe-glossary.md). - **Syntax** - **Join( _sourcearray_** [, **_delimiter_** ] **)** + +## Syntax + +**Join( _sourcearray_** [, **_delimiter_** ] **)** The **Join** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): diff --git a/Language/Reference/User-Interface-Help/keepscrollbarsvisible-property.md b/Language/Reference/User-Interface-Help/keepscrollbarsvisible-property.md index a37f37f9104..cd77239a036 100644 --- a/Language/Reference/User-Interface-Help/keepscrollbarsvisible-property.md +++ b/Language/Reference/User-Interface-Help/keepscrollbarsvisible-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether scroll bars remain visible when not required. - **Syntax** - _object_. **KeepScrollBarsVisible** [= _fmScrollBars_ ] + +## Syntax + +_object_. **KeepScrollBarsVisible** [= _fmScrollBars_ ] The **KeepScrollBarsVisible** property syntax has these parts: @@ -37,7 +39,8 @@ The settings for _fmScrollBars_ are: | _fmScrollBarsVertical_|2|Displays a vertical scroll bar.| | _fmScrollBarsBoth_|3|Displays both a horizontal and a vertical scroll bar (default).| - **Remarks** +## Remarks + If the visible region is large enough to display all the controls on an object such as a **Page** object or a form, scroll bars are not required. The **KeepScrollBarsVisible** property determines whether the scroll bars remain visible when they are not required. If the scroll bars are visible when they are not required, they appear normal in size, and the scroll box fills the entire width or height of the scroll bar. diff --git a/Language/Reference/User-Interface-Help/key-property.md b/Language/Reference/User-Interface-Help/key-property.md index 6adf71eda52..4f819b5a804 100644 --- a/Language/Reference/User-Interface-Help/key-property.md +++ b/Language/Reference/User-Interface-Help/key-property.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Sets a _key_ in a **Dictionary** object. - **Syntax** - _object_. **Key(**_key_**)** = _newkey_ + +## Syntax + +_object_. **Key(**_key_**)** = _newkey_ The **Key** property has the following parts: @@ -28,6 +30,7 @@ The **Key** property has the following parts: | _key_|Required. _Key_ value being changed.| | _newkey_|Required. New value that replaces the specified _key_.| - **Remarks** +## Remarks + If _key_ is not found when changing a _key_, a[run-time error](../../Glossary/vbe-glossary.md) will occur. diff --git a/Language/Reference/User-Interface-Help/keydown-keyup-events.md b/Language/Reference/User-Interface-Help/keydown-keyup-events.md index b7ad1bb947b..6122bf24059 100644 --- a/Language/Reference/User-Interface-Help/keydown-keyup-events.md +++ b/Language/Reference/User-Interface-Help/keydown-keyup-events.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Occur in sequence when a user presses and releases a key. KeyDown occurs when the user presses a key. KeyUp occurs when the user releases a key. - **Syntax** - **Private Sub**_object_ _**KeyDown( ByVal**_KeyCode_**As MSForms.ReturnInteger**, **ByVal**_Shift_**As fmShiftState)** + +## Syntax + +**Private Sub**_object_ _**KeyDown( ByVal**_KeyCode_**As MSForms.ReturnInteger**, **ByVal**_Shift_**As fmShiftState)** **Private Sub**_object_ _**KeyUp( ByVal**_KeyCode_**As MSForms.ReturnInteger**, **ByVal**_Shift_**As fmShiftState)** The **KeyDown** and **KeyUp** event syntaxes have these parts: @@ -36,7 +38,8 @@ The settings for _Shift_ are: | _fmCtrlMask_|2|CTRL was pressed.| | _fmAltMask_|4|ALT was pressed.| - **Remarks** +## Remarks + The KeyDown event occurs when the user presses a key on a running form while that form or a control on it has the [focus](../../Glossary/vbe-glossary.md). The KeyDown and KeyPress events alternate repeatedly until the user releases the key, at which time the KeyUp event occurs. The form or control with the focus receives all keystrokes. A form can have the focus only if it has no controls or all its visible controls are disabled. These events also occur if you send a keystroke to a form or control using either the SendKeys action in a macro or the [SendKeys Statement](../../Glossary/vbe-glossary.md) in Visual Basic. The KeyDown and KeyUp events are typically used to recognize or distinguish between: diff --git a/Language/Reference/User-Interface-Help/keypress-event.md b/Language/Reference/User-Interface-Help/keypress-event.md index 711db4599a2..f3f00f69148 100644 --- a/Language/Reference/User-Interface-Help/keypress-event.md +++ b/Language/Reference/User-Interface-Help/keypress-event.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Occurs when the user presses an ANSI key. - **Syntax** - **Private Sub**_object_ _**KeyPress( ByVal**_KeyANSI_**As MSForms.ReturnInteger)** + +## Syntax + +**Private Sub**_object_ _**KeyPress( ByVal**_KeyANSI_**As MSForms.ReturnInteger)** The **KeyPress** event syntax has these parts: @@ -26,7 +28,8 @@ The **KeyPress** event syntax has these parts: | _object_|Required. A valid object.| | _KeyANSI_|Required. An integer value that represents a standard numeric ANSI key code.| - **Remarks** +## Remarks + The KeyPress event occurs when the user presses a key that produces a typeable character (an ANSI key) on a running form while the form or a control on it has the [focus](../../Glossary/vbe-glossary.md). The event can occur either before or after the key is released. This event also occurs if you send an ANSI keystroke to a form or control using either the SendKeys action in a macro or the [SendKeys Statement](../../Glossary/vbe-glossary.md) in Visual Basic. A KeyPress event can occur when any of the following keys are pressed: diff --git a/Language/Reference/User-Interface-Help/keys-method.md b/Language/Reference/User-Interface-Help/keys-method.md index 44bfbf193fb..1ad71ed2c31 100644 --- a/Language/Reference/User-Interface-Help/keys-method.md +++ b/Language/Reference/User-Interface-Help/keys-method.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns an array containing all existing keys in a **Dictionary** object. - **Syntax** - _object_. **Keys** + +## Syntax + +_object_. **Keys** The _object_ is always the name of a **Dictionary** object. - **Remarks** + +## Remarks + The following code illustrates use of the **Keys** method: diff --git a/Language/Reference/User-Interface-Help/kill-statement.md b/Language/Reference/User-Interface-Help/kill-statement.md index 2c82aba5132..03846ec84e9 100644 --- a/Language/Reference/User-Interface-Help/kill-statement.md +++ b/Language/Reference/User-Interface-Help/kill-statement.md @@ -13,12 +13,14 @@ ms.date: 06/08/2017 Deletes files from a disk. - **Syntax** +## Syntax - **Kill**_pathname_ +**Kill**_pathname_ The required _pathname_[argument](../../Glossary/vbe-glossary.md) is a[string expression](../../Glossary/vbe-glossary.md) that specifies one or more file names to be deleted. The _pathname_ may include the directory or folder, and the drive. - **Remarks** + +## Remarks + In Microsoft Windows, **Kill** supports the use of multiple-character (**\***) and single-character (**?**) wildcards to specify multiple files. However, on the Macintosh, these characters are treated as valid file name characters and can't be used as wildcards to specify multiple files. Since the Macintosh doesn't support the wildcards, use the file type to identify groups of files to delete. You can use the **MacID** function to specify file type instead of repeating the command with separate file names. For example, the following statement deletes all TEXT files in the current folder. diff --git a/Language/Reference/User-Interface-Help/label-control.md b/Language/Reference/User-Interface-Help/label-control.md index 325acfe9c6f..0641fdac351 100644 --- a/Language/Reference/User-Interface-Help/label-control.md +++ b/Language/Reference/User-Interface-Help/label-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Displays descriptive text. - **Remarks** + +## Remarks + A **Label** control on a form displays descriptive text such as titles, captions, pictures, or brief instructions. For example, labels for an address book might include a **Label** for a name, street, or city. A **Label** doesn't display values from[data sources](../../../language/Glossary/glossary-vba.md) or expressions; it is always[unbound](../../../language/Glossary/glossary-vba.md) and doesn't change as you move from record to record. The default property for a **Label** is the **Caption** property. The default event for a **Label** is the Click event. diff --git a/Language/Reference/User-Interface-Help/largechange-property.md b/Language/Reference/User-Interface-Help/largechange-property.md index e3fbf3a3ed5..6ebfde0a9f0 100644 --- a/Language/Reference/User-Interface-Help/largechange-property.md +++ b/Language/Reference/User-Interface-Help/largechange-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the amount of movement that occurs when the user clicks between the scroll box and scroll arrow. - **Syntax** - _object_. **LargeChange** [= _Long_ ] + +## Syntax + +_object_. **LargeChange** [= _Long_ ] The **LargeChange** property syntax has these parts: @@ -26,7 +28,8 @@ The **LargeChange** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. An integer that specifies the amount of change to the **Value** property.| - **Remarks** +## Remarks + The **LargeChange** property applies only to the **ScrollBar**. It does not apply to the scrollbars in other controls such as a **TextBox** or a drop-down **ComboBox**. The value of **LargeChange** is the amount by which the **ScrollBar's Value** property changes when the user clicks the area between the scroll box and scroll arrow. The direction of the movement is always toward the place where the user clicks. For example, in a horizontal **ScrollBar**, clicking to the left of the scroll box moves the scroll box to the left. In a vertical **ScrollBar**, clicking above the scroll box moves the scroll box up. **LargeChange** does not have units. Any integer is a valid setting for **LargeChange**. The recommended range of values is from -32,767 to +32,767, and the value must be between the values of the **Max** and **Min** properties of the **ScrollBar**. diff --git a/Language/Reference/User-Interface-Help/lastdllerror-property.md b/Language/Reference/User-Interface-Help/lastdllerror-property.md index 1d31ebcdec1..bc5c156031d 100644 --- a/Language/Reference/User-Interface-Help/lastdllerror-property.md +++ b/Language/Reference/User-Interface-Help/lastdllerror-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Returns a system error code produced by a call to a [dynamic-link library](../../Glossary/vbe-glossary.md) (DLL). Read-only. LastDLLError always returns zero on the Macintosh. - **Remarks** + +## Remarks + The **LastDLLError**[property](../../Glossary/vbe-glossary.md) applies only to DLL calls made from Visual Basic code. When such a call is made, the called function usually returns a code indicating success or failure, and the **LastDLLError** property is filled. Check the documentation for the DLL's functions to determine the return values that indicate success or failure. Whenever the failure code is returned, the Visual Basic application should immediately check the **LastDLLError** property. No exception is raised when the **LastDLLError** property is set. ## Example diff --git a/Language/Reference/User-Interface-Help/layout-event.md b/Language/Reference/User-Interface-Help/layout-event.md index 02031fa4ac9..c05b93136f7 100644 --- a/Language/Reference/User-Interface-Help/layout-event.md +++ b/Language/Reference/User-Interface-Help/layout-event.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Occurs when a form, **Frame**, or **MultiPage** changes size. - **Syntax** + +## Syntax + For MultiPage **Private Sub**_object_ _**Layout(**_index_**As Long)** For all other controls **Private Sub**_object_ _**Layout( )** The **Layout** event syntax has these parts: @@ -27,7 +29,8 @@ The **Layout** event syntax has these parts: | _object_|Required. A valid object.| | _index_|Required. The index of the page in a **MultiPage** that changed size.| - **Remarks** +## Remarks + The default action of the layout event is to calculate new positions of controls and to repaint the screen. A user can initiate the Layout event by changing the size of a control. For controls that support the **AutoSize** property, the Layout event is initiated when **AutoSize** changes the size of the control. This occurs when the user changes the value of a property that affects the size of a control. For example, increasing the **Font** size of a **TextBox** or **Label** can significantly change the dimensions of the control and initiate a Layout event. diff --git a/Language/Reference/User-Interface-Help/layouteffect-property.md b/Language/Reference/User-Interface-Help/layouteffect-property.md index 3d4e52f7061..7cb33e3b86f 100644 --- a/Language/Reference/User-Interface-Help/layouteffect-property.md +++ b/Language/Reference/User-Interface-Help/layouteffect-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether a control was moved during a layout change. - **Syntax** - _object_. **LayoutEffect** + +## Syntax + +_object_. **LayoutEffect** The **LayoutEffect** property syntax has these parts: @@ -34,7 +36,8 @@ The **LayoutEffect** property return values are: | _fmLayoutEffectNone_|0|The control was not moved.| | _fmLayoutEffectInitiate_|1|The control moved.| - **Remarks** +## Remarks + The **LayoutEffect** property is read-only and is available only in the Layout event. The Layout event is initiated by the **Move** method if the _Layout_ argument is **True**. The Layout event is not initiated when you change the settings of the **Left**, **Top**, **Height**, or **Width** properties of a control. The Layout event sets **LayoutEffect** for any control that was involved in a move operation. For example, if you move a group of controls, **LayoutEffect** of each control is set. diff --git a/Language/Reference/User-Interface-Help/lbound-function.md b/Language/Reference/User-Interface-Help/lbound-function.md index a75551d07b7..31ac83b848e 100644 --- a/Language/Reference/User-Interface-Help/lbound-function.md +++ b/Language/Reference/User-Interface-Help/lbound-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) containing the smallest available subscript for the indicated dimension of an[array](../../Glossary/vbe-glossary.md). - **Syntax** - **LBound(**_arrayname_ [ **,**_dimension_ ] **)** + +## Syntax + +**LBound(**_arrayname_ [ **,**_dimension_ ] **)** The **LBound** function syntax has these parts: @@ -24,7 +26,8 @@ The **LBound** function syntax has these parts: | _arrayname_|Required. Name of the array [variable](../../Glossary/vbe-glossary.md); follows standard variable naming conventions.| | _dimension_|Optional; **Variant** (**Long**). Whole number indicating which dimension's lower bound is returned. Use 1 for the first dimension, 2 for the second, and so on. If _dimension_ is omitted, 1 is assumed.| - **Remarks** +## Remarks + The **LBound** function is used with the **UBound** function to determine the size of an array. Use the **UBound** function to find the upper limit of an array dimension. **LBound** returns the values in the following table for an array with the following dimensions: diff --git a/Language/Reference/User-Interface-Help/lcase-function.md b/Language/Reference/User-Interface-Help/lcase-function.md index a2b072df566..a73f3b9d3ee 100644 --- a/Language/Reference/User-Interface-Help/lcase-function.md +++ b/Language/Reference/User-Interface-Help/lcase-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a [String](../../Glossary/vbe-glossary.md) that has been converted to lowercase. - **Syntax** - **LCase** ( _string_ ) + +## Syntax + +**LCase** ( _string_ ) The required _string_[argument](../../Glossary/vbe-glossary.md) is any valid[string expression](../../Glossary/vbe-glossary.md). If _string_ contains[Null](../../Glossary/vbe-glossary.md), Null is returned. - **Remarks** + +## Remarks + Only uppercase letters are converted to lowercase; all lowercase letters and nonletter characters remain unchanged. ## Example diff --git a/Language/Reference/User-Interface-Help/left-function.md b/Language/Reference/User-Interface-Help/left-function.md index 02b1d45ee03..a98cc198505 100644 --- a/Language/Reference/User-Interface-Help/left-function.md +++ b/Language/Reference/User-Interface-Help/left-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) containing a specified number of characters from the left side of a string. - **Syntax** - **Left** (**_string_**, **_length_**) + +## Syntax + +**Left** (**_string_**, **_length_**) The **Left** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -24,7 +26,8 @@ The **Left** function syntax has these[named arguments](../../Glossary/vbe-glos |**_string_**|Required. [String expression](../../Glossary/vbe-glossary.md) from which the leftmost characters are returned. If **_string_** contains[Null](../../Glossary/vbe-glossary.md), Null is returned.| |**_length_**|Required; **Variant** (**Long**).[Numeric expression](../../Glossary/vbe-glossary.md) indicating how many characters to return. If 0, a zero-length string ("") is returned. If greater than or equal to the number of characters in **_string_**, the entire string is returned.| - **Remarks** +## Remarks + To determine the number of characters in **_string_**, use the **Len** function. **Note** Use the **LeftB** function with byte data contained in a string. Instead of specifying the number of characters to return, **_length_** specifies the number of bytes. diff --git a/Language/Reference/User-Interface-Help/left-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/left-property-vba-add-in-object-model.md index c9118b6a8cf..a6ce0433465 100644 --- a/Language/Reference/User-Interface-Help/left-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/left-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a [Single](../../Glossary/vbe-glossary.md) containing the location of the left edge of the window on the screen in[twips](../../Glossary/vbe-glossary.md). Read/write. - **Remarks** + +## Remarks + The value returned by the **Left** property depends on whether or not the window is[linked](../../Glossary/vbe-glossary.md) or[docked](../../Glossary/vbe-glossary.md). **Note** Changing the **Left** property setting of a linked or docked window has no effect as long as the window remains linked or docked. diff --git a/Language/Reference/User-Interface-Help/left-top-properties.md b/Language/Reference/User-Interface-Help/left-top-properties.md index a91b6dfc0e4..64611ffcba3 100644 --- a/Language/Reference/User-Interface-Help/left-top-properties.md +++ b/Language/Reference/User-Interface-Help/left-top-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 The distance between a control and the left or top edge of the form that contains it. - **Syntax** - _object_. **Left** [= _Single_ ] + +## Syntax + +_object_. **Left** [= _Single_ ] _object_. **Top** [= _Single_ ] The **Left** and **Top** property syntaxes have these parts: @@ -27,6 +29,8 @@ The **Left** and **Top** property syntaxes have these parts: **Settings** Setting the **Left** or **Top** property to 0 places the control's edge at the left or top edge of its[container](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + For most systems, the recommended range of values for **Left** and **Top** is from -32,767 to +32,767. Other values may also work depending on your sytem configuration. For a **ComboBox**, values of **Left** and **Top** apply to the text portion of the control, not to the list portion. When you move or size a control, its new **Left** setting is automatically entered in the property sheet. When you print a form, the control's horizontal or vertical location is determined by its **Left** or **Top** setting. diff --git a/Language/Reference/User-Interface-Help/len-function.md b/Language/Reference/User-Interface-Help/len-function.md index d8e3b6b7e22..07dd2a81a1a 100644 --- a/Language/Reference/User-Interface-Help/len-function.md +++ b/Language/Reference/User-Interface-Help/len-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) containing the number of characters in a string or the number of bytes required to store a[variable](../../Glossary/vbe-glossary.md). - **Syntax** - **Len** ( _string_ | _varname_ ) + +## Syntax + +**Len** ( _string_ | _varname_ ) The **Len** function syntax has these parts: @@ -24,7 +26,8 @@ The **Len** function syntax has these parts: | _string_|Any valid [string expression](../../Glossary/vbe-glossary.md). If _string_ contains[Null](../../Glossary/vbe-glossary.md), Null is returned.| | _Varname_|Any valid [variable](../../Glossary/vbe-glossary.md) name. If _varname_ contains **Null**, **Null** is returned. If _varname_ is a[Variant](../../Glossary/vbe-glossary.md), **Len** treats it the same as a **String** and always returns the number of characters it contains.| - **Remarks** +## Remarks + One (and only one) of the two possible [arguments](../../Glossary/vbe-glossary.md) must be specified. With[user-defined types](../../Glossary/vbe-glossary.md), **Len** returns the size as it will be written to the file. **Note** Use the **LenB** function with byte data contained in a string, as in double-byte character set (DBCS) languages. Instead of returning the number of characters in a string, **LenB** returns the number of bytes used to represent that string. With user-defined types, **LenB** returns the in-memory size, including any padding between elements. For sample code that uses **LenB**, see the second example in the example topic. diff --git a/Language/Reference/User-Interface-Help/let-statement.md b/Language/Reference/User-Interface-Help/let-statement.md index 03b90371361..7f4570f943f 100644 --- a/Language/Reference/User-Interface-Help/let-statement.md +++ b/Language/Reference/User-Interface-Help/let-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Assigns the value of an [expression](../../Glossary/vbe-glossary.md) to a[variable](../../Glossary/vbe-glossary.md) or[property](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax [ **Let** ] _varname_**=**_expression_ @@ -26,7 +26,8 @@ The **Let** statement syntax has these parts: | _varname_|Required. Name of the variable or property; follows standard variable naming conventions.| | _expression_|Required. Value assigned to the variable or property.| - **Remarks** +## Remarks + A value expression can be assigned to a variable or property only if it is of a [data type](../../Glossary/vbe-glossary.md) that is compatible with the variable. You can't assign[string expressions](../../Glossary/vbe-glossary.md) to numeric variables, and you can't assign[numeric expressions](../../Glossary/vbe-glossary.md) to string variables. If you do, an error occurs at[compile time](../../Glossary/vbe-glossary.md). [Variant](../../Glossary/vbe-glossary.md) variables can be assigned either string or numeric expressions. However, the reverse is not always true. Any **Variant** except a[Null](../../Glossary/vbe-glossary.md) can be assigned to a string variable, but only a **Variant** whose value can be interpreted as a number can be assigned to a numeric variable. Use the **IsNumeric** function to determine if the **Variant** can be converted to a number. Assigning an expression of one [numeric type](../../Glossary/vbe-glossary.md) to a variable of a different numeric type coerces the value of the expression into the numeric type of the resulting variable. diff --git a/Language/Reference/User-Interface-Help/like-operator.md b/Language/Reference/User-Interface-Help/like-operator.md index 380ac84638d..4bb312f09ae 100644 --- a/Language/Reference/User-Interface-Help/like-operator.md +++ b/Language/Reference/User-Interface-Help/like-operator.md @@ -15,7 +15,7 @@ ms.date: 06/08/2017 Used to compare two strings. -**Syntax** +## Syntax _result_ **=** _string_ **Like** _pattern_ @@ -28,7 +28,7 @@ The **Like** operator syntax has these parts: | _string_|Required; any [string expression](../../Glossary/vbe-glossary.md).| | _pattern_|Required; any string expression conforming to the pattern-matching conventions described in Remarks.| -**Remarks** +## Remarks If _string_ matches _pattern_, _result_ is **True**; if there is no match, _result_ is **False**. If either _string_ or _pattern_ is[Null](../../Glossary/vbe-glossary.md), _result_ is **Null**. The behavior of the **Like** operator depends on the **Option Compare** statement. The default[string-comparison](../../Glossary/vbe-glossary.md) method for each[module](../../Glossary/vbe-glossary.md) is **Option Compare** **Binary**. diff --git a/Language/Reference/User-Interface-Help/line-inputstatement.md b/Language/Reference/User-Interface-Help/line-inputstatement.md index 4c50dd7235d..0159306f0a1 100644 --- a/Language/Reference/User-Interface-Help/line-inputstatement.md +++ b/Language/Reference/User-Interface-Help/line-inputstatement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Reads a single line from an open sequential file and assigns it to a [String](../../Glossary/vbe-glossary.md)[variable](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **Line Input #**_filenumber_, _varname_ +**Line Input #**_filenumber_, _varname_ The **Line Input #** statement syntax has these parts: @@ -25,7 +25,8 @@ The **Line Input #** statement syntax has these parts: | _filenumber_|Required. Any valid [file number](../../Glossary/vbe-glossary.md).| | _varname_|Required. Valid [Variant](../../Glossary/vbe-glossary.md) or **String** variable name.| - **Remarks** +## Remarks + Data read with **Line Input #** is usually written from a file with **Print #**. The **Line Input #** statement reads from a file one character at a time until it encounters a carriage return (**Chr(** 13 **)**) or carriage return-linefeed (**Chr(** 13 **)** + **Chr(** 10 **)**) sequence. Carriage return-linefeed sequences are skipped rather than appended to the character string. diff --git a/Language/Reference/User-Interface-Help/line-property.md b/Language/Reference/User-Interface-Help/line-property.md index 14795efad60..ff9402262cc 100644 --- a/Language/Reference/User-Interface-Help/line-property.md +++ b/Language/Reference/User-Interface-Help/line-property.md @@ -17,9 +17,13 @@ ms.date: 06/08/2017 **Description** Read-only property that returns the current line number in a **TextStream** file. - **Syntax** - _object_. **Line** + +## Syntax + +_object_. **Line** The _object_ is always the name of a **TextStream** object. - **Remarks** + +## Remarks + After a file is initially opened and before anything is written, **Line** is equal to 1. diff --git a/Language/Reference/User-Interface-Help/linecount-property.md b/Language/Reference/User-Interface-Help/linecount-property.md index cdcabcb3c9d..d25fdeb73d7 100644 --- a/Language/Reference/User-Interface-Help/linecount-property.md +++ b/Language/Reference/User-Interface-Help/linecount-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns the number of text lines in a **TextBox** or **ComboBox**. - **Syntax** - _object_. **LineCount** + +## Syntax + +_object_. **LineCount** The **LineCount** property syntax has these parts: @@ -25,7 +27,8 @@ The **LineCount** property syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The **LineCount** property is read-only. **Note** A **ComboBox** will only have one line. diff --git a/Language/Reference/User-Interface-Help/lines-property.md b/Language/Reference/User-Interface-Help/lines-property.md index e71acb4cb99..f2c82dd8197 100644 --- a/Language/Reference/User-Interface-Help/lines-property.md +++ b/Language/Reference/User-Interface-Help/lines-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns a string containing the specified number of lines of code. - **Syntax** - _object_**.Lines(**_startline_, _count_**) As String** + +## Syntax + +_object_**.Lines(**_startline_, _count_**) As String** The **Lines** syntax has these parts: @@ -27,6 +29,7 @@ The **Lines** syntax has these parts: | _startline_|Required. A [Long](../../Glossary/vbe-glossary.md) specifying the line number in which to start.| | _count_|Required. A **Long** specifying the number of lines you want to return.| - **Remarks** +## Remarks + The [line numbers](../../Glossary/vbe-glossary.md) in a[code module](../../Glossary/vbe-glossary.md) begin at 1. diff --git a/Language/Reference/User-Interface-Help/linkedwindowframe-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/linkedwindowframe-property-vba-add-in-object-model.md index d4a22881750..c564d79b5a9 100644 --- a/Language/Reference/User-Interface-Help/linkedwindowframe-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/linkedwindowframe-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns the **Window** object representing the frame that contains the window. Read-only. - **Remarks** + +## Remarks + The **LinkedWindowFrame** property enables you to access the object representing the[linked window frame](../../Glossary/vbe-glossary.md), which has properties distinct from the window or windows it contains. If the window isn't linked, the **LinkedWindowFrame** property returns **Nothing**. diff --git a/Language/Reference/User-Interface-Help/linkedwindows-collection-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/linkedwindows-collection-vba-add-in-object-model.md index a0a57bbb29d..cf5bf9a635f 100644 --- a/Language/Reference/User-Interface-Help/linkedwindows-collection-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/linkedwindows-collection-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Contains all linked windows in a [linked window frame](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + Use the **LinkedWindows** collection to modify the[docked](../../Glossary/vbe-glossary.md) and[linked](../../Glossary/vbe-glossary.md) state of windows in the[development environment](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/linkedwindows-property.md b/Language/Reference/User-Interface-Help/linkedwindows-property.md index a2d2e07eb04..2dba97bcbf5 100644 --- a/Language/Reference/User-Interface-Help/linkedwindows-property.md +++ b/Language/Reference/User-Interface-Help/linkedwindows-property.md @@ -16,6 +16,8 @@ ms.date: 06/08/2017 Returns the collection of all linked windows contained in a linked window frame. Read-only. - **Remarks** + +## Remarks + The **LinkedWindows** property is an accessor property (that is, a property that returns an object of the same type as the property name). diff --git a/Language/Reference/User-Interface-Help/list-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/list-property-microsoft-forms.md index 26e611957ff..8c5f9b82be8 100644 --- a/Language/Reference/User-Interface-Help/list-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/list-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns or sets the list entries of a **ListBox** or **ComboBox**. - **Syntax** - _object_. **List(**_row, column_**)** [= _Variant_ ] + +## Syntax + +_object_. **List(**_row, column_**)** [= _Variant_ ] The **List** property syntax has these parts: @@ -28,7 +30,9 @@ The **List** property syntax has these parts: **Settings** Row and column numbering begins with zero. That is, the row number of the first row in the list is zero; the column number of the first column is zero. The number of the second row or column is 1, and so on. - **Remarks** + +## Remarks + The **List** property works with the **ListCount** and **ListIndex** properties.Use **List** to access list items. A list is a variant[array](../../Glossary/vbe-glossary.md); each item in the list has a row number and a column number. Initially, **ComboBox** and **ListBox** contain an empty list. diff --git a/Language/Reference/User-Interface-Help/listbox-control.md b/Language/Reference/User-Interface-Help/listbox-control.md index 70cb7f9ade5..4e034040f68 100644 --- a/Language/Reference/User-Interface-Help/listbox-control.md +++ b/Language/Reference/User-Interface-Help/listbox-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Displays a list of values and lets you select one or more. - **Remarks** + +## Remarks + If the **ListBox** is [bound](../../../language/Glossary/glossary-vba.md) to a [data source](../../../language/Glossary/glossary-vba.md), then the **ListBox** stores the selected value in that data source. The **ListBox** can either appear as a list or as a group of **OptionButton** controls or **CheckBox** controls. The default property for a **ListBox** is the **Value** property. diff --git a/Language/Reference/User-Interface-Help/listcount-property.md b/Language/Reference/User-Interface-Help/listcount-property.md index f177c0b0434..18b527519db 100644 --- a/Language/Reference/User-Interface-Help/listcount-property.md +++ b/Language/Reference/User-Interface-Help/listcount-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns the number of list entries in a control. - **Syntax** - _object_. **ListCount** + +## Syntax + +_object_. **ListCount** The **ListCount** property syntax has these parts: @@ -26,6 +28,7 @@ The **ListCount** property syntax has these parts: ||| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The **ListCount** property is read-only. **ListCount** is the number of rows over which you can scroll. **ListRows** is the maximum to display at once. **ListCount** is always one greater than the largest value for the **ListIndex** property, because index numbers begin with 0 and the count of items begins with 1. If no item is selected, **ListCount** is 0 and **ListIndex** is -1. diff --git a/Language/Reference/User-Interface-Help/listindex-property.md b/Language/Reference/User-Interface-Help/listindex-property.md index c05d84504d8..dff93e92bde 100644 --- a/Language/Reference/User-Interface-Help/listindex-property.md +++ b/Language/Reference/User-Interface-Help/listindex-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Identifies the currently selected item in a **ListBox** or **ComboBox**. - **Syntax** - _object_. **ListIndex** [= _Variant_ ] + +## Syntax + +_object_. **ListIndex** [= _Variant_ ] The **ListIndex** property syntax has these parts: @@ -26,7 +28,8 @@ The **ListIndex** property syntax has these parts: | _object_|Required. A valid object.| | _Variant_|Optional. The currently selected item in the control.| - **Remarks** +## Remarks + The **ListIndex** property contains an index of the selected row in a list. Values of **ListIndex** range from -1 to one less than the total number of rows in a list (that is, **ListCount** - 1). When no rows are selected, **ListIndex** returns -1. When the user selects a row in a **ListBox** or **ComboBox**, the system sets the **ListIndex** value. The **ListIndex** value of the first row in a list is 0, the value of the second row is 1, and so on. **Note** If you use the **MultiSelect** property to create a **ListBox** that allows multiple selections, the **Selected** property of the **ListBox** (rather than the **ListIndex** property) identifies the selected rows. The **Selected** property is an[array](../../Glossary/vbe-glossary.md) with the same number of values as the number of rows in the **ListBox**. For each row in the list box, **Selected** is **True** if the row is selected and **False** if it is not. In a **ListBox** that allows multiple selections, **ListIndex** returns the index of the row that has[focus](../../Glossary/vbe-glossary.md), regardless of whether that row is currently selected. diff --git a/Language/Reference/User-Interface-Help/listrows-property.md b/Language/Reference/User-Interface-Help/listrows-property.md index 9d70475e919..08ddc7e7cc7 100644 --- a/Language/Reference/User-Interface-Help/listrows-property.md +++ b/Language/Reference/User-Interface-Help/listrows-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the maximum number of rows to display in the list. - **Syntax** - _object_. **ListRows** [= _Long_ ] + +## Syntax + +_object_. **ListRows** [= _Long_ ] The **ListRows** property syntax has these parts: @@ -26,6 +28,7 @@ The **ListRows** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. An integer indicating the maximum number of rows. The default value is 8.| - **Remarks** +## Remarks + If the number of items in the list exceeds the value of the **ListRows** property, a scroll bar appears at the right edge of the list box portion of the combo box. diff --git a/Language/Reference/User-Interface-Help/liststyle-property.md b/Language/Reference/User-Interface-Help/liststyle-property.md index 3d422c19567..5d090d89388 100644 --- a/Language/Reference/User-Interface-Help/liststyle-property.md +++ b/Language/Reference/User-Interface-Help/liststyle-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the visual appearance of the list in a **ListBox** or **ComboBox**. - **Syntax** - _object_. **ListStyle** [= _fmListStyle_ ] + +## Syntax + +_object_. **ListStyle** [= _fmListStyle_ ] The **ListStyle** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _fmListStyle_ are: | _fmListStylePlain_|0|Looks like a regular list box, with the background of items highlighted.| | _fmListStyleOption_|1|Shows option buttons, or check boxes for a multi-select list (default). When the user selects an item from the group, the option button associated with that item is selected and the option buttons for the other items in the group are deselected.| - **Remarks** +## Remarks + The **ListStyle** property lets you change the visual presentation of a **ListBox** or **ComboBox**. By specifying a setting other than **fmListStylePlain**, you can present the contents of either control as a group of individual items, with each item including a visual cue to indicate whether it is selected. If the control supports a single selection (the **MultiSelect** property is set to **fmMultiSelectSingle**), the user can press one button in the group. If the control supports multi-select, the user can press two or more buttons in the group. diff --git a/Language/Reference/User-Interface-Help/listwidth-property.md b/Language/Reference/User-Interface-Help/listwidth-property.md index f39b971d9ed..b7eda86d9df 100644 --- a/Language/Reference/User-Interface-Help/listwidth-property.md +++ b/Language/Reference/User-Interface-Help/listwidth-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the width of the list in a **ComboBox**. - **Syntax** - _object_. **ListWidth** [= _Variant_ ] + +## Syntax + +_object_. **ListWidth** [= _Variant_ ] The **ListWidth** property syntax has these parts: @@ -26,6 +28,7 @@ The **ListWidth** property syntax has these parts: | _object_|Required. A valid object.| | _Variant_|Optional. The width of the list. A value of zero makes the list as wide as the **ComboBox**. The default value is to make the list as wide as the text portion of the control.| - **Remarks** +## Remarks + If you want to display a multicolumn list, enter a value that will make the list box wide enough to fit all the columns. diff --git a/Language/Reference/User-Interface-Help/load-statement.md b/Language/Reference/User-Interface-Help/load-statement.md index 4b9d2db53ce..5e80854e04b 100644 --- a/Language/Reference/User-Interface-Help/load-statement.md +++ b/Language/Reference/User-Interface-Help/load-statement.md @@ -13,12 +13,14 @@ ms.date: 06/08/2017 Loads an object but doesn't show it. - **Syntax** +## Syntax - **Load**_object_ +**Load**_object_ The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + When an object is loaded, it is placed in memory, but isn't visible. Use the **Show** method to make the object visible. Until an object is visible, a user can't interact with it. The object can be manipulated programmatically in its Initialize event procedure. ## Example diff --git a/Language/Reference/User-Interface-Help/loc-function.md b/Language/Reference/User-Interface-Help/loc-function.md index bbdc0eefbc2..9afe73df67d 100644 --- a/Language/Reference/User-Interface-Help/loc-function.md +++ b/Language/Reference/User-Interface-Help/loc-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) specifying the current read/write position within an open file. - **Syntax** - **Loc(**_filenumber_**)** + +## Syntax + +**Loc(**_filenumber_**)** The required _filenumber_[argument](../../Glossary/vbe-glossary.md) is any valid[Integer](../../Glossary/vbe-glossary.md)[file number](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + The following describes the return value for each file access mode: diff --git a/Language/Reference/User-Interface-Help/lock-unlock-statements.md b/Language/Reference/User-Interface-Help/lock-unlock-statements.md index 13ecdedc80f..b71defc728c 100644 --- a/Language/Reference/User-Interface-Help/lock-unlock-statements.md +++ b/Language/Reference/User-Interface-Help/lock-unlock-statements.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Controls access by other processes to all or part of a file opened using the **Open** statement. - **Syntax** +## Syntax - **Lock** [ **#** ] _filenumber_ [, _recordrange_ ] +**Lock** [ **#** ] _filenumber_ [, _recordrange_ ] **. . .** **Unlock** [ **#** ] _filenumber_ [, _recordrange_ ] @@ -38,7 +38,8 @@ The _recordrange_[argument](../../Glossary/vbe-glossary.md) settings are: | _start_|Number of the first record or byte to lock or unlock.| | _end_|Number of the last record or byte to lock or unlock.| - **Remarks** +## Remarks + The **Lock** and **Unlock** statements are used in environments where several processes might need access to the same file. **Lock** and **Unlock** statements are always used in pairs. The arguments to **Lock** and **Unlock** must match exactly. The first record or byte in a file is at position 1, the second record or byte is at position 2, and so on. If you specify just one record, then only that record is locked or unlocked. If you specify a range of records and omit a starting record ( _start_ ), all records from the first record to the end of the range ( _end_ ) are locked or unlocked. Using **Lock** without _recnumber_ locks the entire file; using **Unlock** without _recnumber_ unlocks the entire file. diff --git a/Language/Reference/User-Interface-Help/locked-property.md b/Language/Reference/User-Interface-Help/locked-property.md index 81214bab867..c535fd8cfb4 100644 --- a/Language/Reference/User-Interface-Help/locked-property.md +++ b/Language/Reference/User-Interface-Help/locked-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether a control can be edited. - **Syntax** - _object_. **Locked** [= _Boolean_ ] + +## Syntax + +_object_. **Locked** [= _Boolean_ ] The **Locked** property syntax has these parts: @@ -35,6 +37,7 @@ The settings for _Boolean_ are: |**True**|You can't edit the value.| |**False**|You can edit the value (default).| - **Remarks** +## Remarks + When a control is locked and enabled, it can still initiate events and can still receive the [focus](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/lof-function.md b/Language/Reference/User-Interface-Help/lof-function.md index b2395dfd272..f28d36a2ca2 100644 --- a/Language/Reference/User-Interface-Help/lof-function.md +++ b/Language/Reference/User-Interface-Help/lof-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) representing the size, in bytes, of a file opened using the **Open** statement. - **Syntax** - **LOF(**_filenumber_**)** + +## Syntax + +**LOF(**_filenumber_**)** The required _filenumber_[argument](../../Glossary/vbe-glossary.md) is an[Integer](../../Glossary/vbe-glossary.md) containing a valid[file number](../../Glossary/vbe-glossary.md). **Note** Use the **FileLen** function to obtain the length of a file that is not open. diff --git a/Language/Reference/User-Interface-Help/log-function.md b/Language/Reference/User-Interface-Help/log-function.md index 9d874e5cb75..18b8f483626 100644 --- a/Language/Reference/User-Interface-Help/log-function.md +++ b/Language/Reference/User-Interface-Help/log-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Double** specifying the natural logarithm of a number. - **Syntax** - **Log(**_number_**)** + +## Syntax + +**Log(**_number_**)** The required _number_[argument](../../Glossary/vbe-glossary.md) is a[Double](../../Glossary/vbe-glossary.md) or any valid[numeric expression](../../Glossary/vbe-glossary.md) greater than zero. - **Remarks** + +## Remarks + The natural logarithm is the logarithm to the base _e_. The[constant ](../../Glossary/vbe-glossary.md) _e_ is approximately 2.718282. You can calculate base- _n_ logarithms for any number _x_ by dividing the natural logarithm of _x_ by the natural logarithm of _n_ as follows: Log _n(x)_ = **Log** ( _x_ ) / **Log** ( _n_ ) diff --git a/Language/Reference/User-Interface-Help/lset-statement.md b/Language/Reference/User-Interface-Help/lset-statement.md index f71da27326b..62d461cd304 100644 --- a/Language/Reference/User-Interface-Help/lset-statement.md +++ b/Language/Reference/User-Interface-Help/lset-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Left aligns a string within a string [variable](../../Glossary/vbe-glossary.md), or copies a variable of one [user-defined type](../../Glossary/vbe-glossary.md) to another variable of a different user-defined type. - **Syntax** +## Syntax - **LSet**_stringvar_**=**_string_ +**LSet**_stringvar_**=**_string_ **LSet**_varname1_**=**_varname2_ The **LSet** statement syntax has these parts: @@ -28,8 +28,9 @@ The **LSet** statement syntax has these parts: | _varname1_|Required. Variable name of the user-defined type being copied to.| | _varname2_|Required. Variable name of the user-defined type being copied from.| - **Remarks** - **LSet** replaces any leftover characters in _stringvar_ with spaces. +## Remarks + +**LSet** replaces any leftover characters in _stringvar_ with spaces. If _string_ is longer than _stringvar_, **LSet** places only the leftmost characters, up to the length of the _stringvar,_ in _stringvar_. Using **LSet** to copy a variable of one user-defined type into a variable of a different user-defined type is not recommended. Copying data of one[data type](../../Glossary/vbe-glossary.md) into space reserved for a different data type can cause unpredictable results. When you copy a variable from one user-defined type to another, the binary data from one variable is copied into the memory space of the other, without regard for the data types specified for the elements. diff --git a/Language/Reference/User-Interface-Help/ltrim-rtrim-and-trim-functions.md b/Language/Reference/User-Interface-Help/ltrim-rtrim-and-trim-functions.md index ba6a789c1c8..4952d4ffc90 100644 --- a/Language/Reference/User-Interface-Help/ltrim-rtrim-and-trim-functions.md +++ b/Language/Reference/User-Interface-Help/ltrim-rtrim-and-trim-functions.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) containing a copy of a specified string without leading spaces (**LTrim**), trailing spaces (**RTrim**), or both leading and trailing spaces (**Trim**). - **Syntax** - **LTrim** ( _string_ ) + +## Syntax + +**LTrim** ( _string_ ) **RTrim** ( _string_ ) **Trim** ( _string_ ) The required _string_[argument](../../Glossary/vbe-glossary.md) is any valid[string expression](../../Glossary/vbe-glossary.md). If _string_ contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned. diff --git a/Language/Reference/User-Interface-Help/macid-function.md b/Language/Reference/User-Interface-Help/macid-function.md index 552e97fb497..56cffc6e123 100644 --- a/Language/Reference/User-Interface-Help/macid-function.md +++ b/Language/Reference/User-Interface-Help/macid-function.md @@ -14,11 +14,15 @@ ms.date: 06/08/2017 Used on the Macintosh to convert a 4-character [constant](../../Glossary/vbe-glossary.md) to a value that may be used by **Dir**, **Kill**, **Shell**, and **AppActivate**. - **Syntax** - **MacID(** constant **)** + +## Syntax + +**MacID(** constant **)** The required _constant_ argument consists of 4 characters used to specify a resource type, file type, application signature, or Apple Event, for example, TEXT, OBIN, "XLS5" for Excel files ("XLS8" for Excel 97), Microsoft Word uses "W6BN" ("W8BN" for Word 97), and so on. - **Remarks** - **MacID** is used with **Dir** and **Kill** to specify a Macintosh file type. Since the Macintosh does not support **\*** and **?** as wildcards, you can use a four-character constant instead to identify groups of files. For example, the following statement returns TEXT type files from the current folder: + +## Remarks + +**MacID** is used with **Dir** and **Kill** to specify a Macintosh file type. Since the Macintosh does not support **\*** and **?** as wildcards, you can use a four-character constant instead to identify groups of files. For example, the following statement returns TEXT type files from the current folder: diff --git a/Language/Reference/User-Interface-Help/macscript-function.md b/Language/Reference/User-Interface-Help/macscript-function.md index 38f8adb2e33..9d64d302b8d 100644 --- a/Language/Reference/User-Interface-Help/macscript-function.md +++ b/Language/Reference/User-Interface-Help/macscript-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 **Note** This function has been deprecated, therefore it is no longer supported. For information, see this [Stack Overflow article](https://stackoverflow.com/a/30949324/209942). Executes an AppleScript script and returns a value returned by the script, if any. - **Syntax** - **MacScript**_script_ + +## Syntax + +**MacScript**_script_ The _script_ argument is a [String expression](../../Glossary/vbe-glossary.md). The **String** expression either can be a series of AppleScript commands or can specify the name of an AppleScript script or a script file. - **Remarks** + +## Remarks + Multiline scripts can be created by embedding carriage-return characters (**Chr(** 13 **)**). diff --git a/Language/Reference/User-Interface-Help/mainwindow-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/mainwindow-property-vba-add-in-object-model.md index c60f88f9bd7..08d6f432980 100644 --- a/Language/Reference/User-Interface-Help/mainwindow-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/mainwindow-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns a **Window** object representing the main window of the Visual Basic[development environment](../../Glossary/vbe-glossary.md). Read-only. - **Remarks** + +## Remarks + You can use the **Window** object returned by the **MainWindow** property to add or remove[docked windows](../../Glossary/vbe-glossary.md). You can also use the **Window** object returned by the **MainWindow** property to maximize, minimize, hide, or restore the main window of the Visual Basic development environment. diff --git a/Language/Reference/User-Interface-Help/major-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/major-property-vba-add-in-object-model.md index 1677bca6039..5a2f8696bf4 100644 --- a/Language/Reference/User-Interface-Help/major-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/major-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) containing the major version number of the referenced[type library](../../Glossary/vbe-glossary.md). Read-only. - **Remarks** + +## Remarks + The number returned by the **Major** property corresponds to the major version number stored in the type library to which you have set the reference. diff --git a/Language/Reference/User-Interface-Help/makecompiledfile-method.md b/Language/Reference/User-Interface-Help/makecompiledfile-method.md index 55a0cec7644..4e76a334e06 100644 --- a/Language/Reference/User-Interface-Help/makecompiledfile-method.md +++ b/Language/Reference/User-Interface-Help/makecompiledfile-method.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Causes the current project to be written as a DLL. The DLL name is specified by the **BuildFileName** property. - **Syntax** - _object_. **MakeCompiledFile** + +## Syntax + +_object_. **MakeCompiledFile** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. diff --git a/Language/Reference/User-Interface-Help/matchentry-property.md b/Language/Reference/User-Interface-Help/matchentry-property.md index d29233bac6e..1a8ce47a364 100644 --- a/Language/Reference/User-Interface-Help/matchentry-property.md +++ b/Language/Reference/User-Interface-Help/matchentry-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns or sets a value indicating how a **ListBox** or **ComboBox** searches its list as the user types. - **Syntax** - _object_. **MatchEntry** [= _fmMatchEntry_ ] + +## Syntax + +_object_. **MatchEntry** [= _fmMatchEntry_ ] The **MatchEntry** property syntax has these parts: @@ -36,7 +38,8 @@ The settings for _fmMatchEntry_ are: | _FmMatchEntryComplete_|1|Extended matching. As each character is typed, the control searches for an entry matching all characters entered (default).| | _FmMatchEntryNone_|2|No matching.| - **Remarks** +## Remarks + The **MatchEntry** property searches entries from the **TextColumn** property of a **ListBox** or **ComboBox**. The control searches the column identified by **TextColumn** for an entry that matches the user's typed entry. Upon finding a match, the row containing the match is selected, the contents of the column are displayed, and the contents of its **BoundColumn** property become the value of the control. If the match is unambiguous, finding the match initiates the Click event. The control initiates the Click event as soon as the user types a sequence of characters that match exactly one entry in the list. As the user types, the entry is compared with the current row in the list and with the next row in the list. When the entry matches only the current row, the match is unambiguous. diff --git a/Language/Reference/User-Interface-Help/matchfound-property.md b/Language/Reference/User-Interface-Help/matchfound-property.md index 2bd38c1ed23..a8404f97058 100644 --- a/Language/Reference/User-Interface-Help/matchfound-property.md +++ b/Language/Reference/User-Interface-Help/matchfound-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Indicates whether the text that a user has typed into a combo box matches any of the entries in the list. - **Syntax** - _object_. **MatchFound** + +## Syntax + +_object_. **MatchFound** The **MatchFound** property syntax has these parts: @@ -34,6 +36,7 @@ The **MatchFound** property return values are: |**True**|The contents of the **Value** property matches one of the records in the list.| |**False**|The contents of **Value** does not match any of the records in the list (default).| - **Remarks** +## Remarks + The **MatchFound** property is read-only. It is not applicable when the **MatchEntry** property is set to **fmMatchEntryNone**. diff --git a/Language/Reference/User-Interface-Help/matchrequired-property.md b/Language/Reference/User-Interface-Help/matchrequired-property.md index eba706f5277..f74a6430cf2 100644 --- a/Language/Reference/User-Interface-Help/matchrequired-property.md +++ b/Language/Reference/User-Interface-Help/matchrequired-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether a value entered in the text portion of a **ComboBox** must match an entry in the existing list portion of the control. The user can enter non-matching values, but may not leave the control until a matching value is entered. - **Syntax** - _object_. **MatchRequired** [= _Boolean_ ] + +## Syntax + +_object_. **MatchRequired** [= _Boolean_ ] The **MatchRequired** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|The text entered must match an existing list entry.| |**False**|The text entered can be different from all existing list entries (default).| - **Remarks** +## Remarks + If the **MatchRequired** property is **True**, the user cannot exit the **ComboBox** until the text entered matches an entry in the existing list. **MatchRequired** maintains the integrity of the list by requiring the user to select an existing entry. **Note** Not all [containers](../../Glossary/vbe-glossary.md) enforce this property. diff --git a/Language/Reference/User-Interface-Help/max-min-properties.md b/Language/Reference/User-Interface-Help/max-min-properties.md index 8047940719a..e05d3d3ce44 100644 --- a/Language/Reference/User-Interface-Help/max-min-properties.md +++ b/Language/Reference/User-Interface-Help/max-min-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Specify the maximum and minimum acceptable values for the **Value** property of a **ScrollBar** or **SpinButton**. - **Syntax** - _object_. **Max** [= _Long_ ] + +## Syntax + +_object_. **Max** [= _Long_ ] _object_. **Min** [= _Long_ ] The **Max** and **Min** property syntaxes have these parts: @@ -25,7 +27,8 @@ The **Max** and **Min** property syntaxes have these parts: | _object_|Required. A valid object.| | _Long_|Optional. A numeric expression specifying the maximum or minimum **Value** property setting.| - **Remarks** +## Remarks + Clicking a **SpinButton** or moving the scroll box in a **ScrollBar** changes the **Value** property of the control. The value for the **Max** property corresponds to the lowest position of a vertical **ScrollBar** or the rightmost position of a horizontal **ScrollBar**. The value for the **Min** property corresponds to the highest position of a vertical **ScrollBar** or the leftmost position of a horizontal **ScrollBar**. Any integer is an acceptable setting for this property. The recommended range of values is from -32,767 to +32,767. The default value is 1. diff --git a/Language/Reference/User-Interface-Help/maxlength-property.md b/Language/Reference/User-Interface-Help/maxlength-property.md index 25b9da84ebd..c10439ad98e 100644 --- a/Language/Reference/User-Interface-Help/maxlength-property.md +++ b/Language/Reference/User-Interface-Help/maxlength-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the maximum number of characters a user can enter in a **TextBox** or **ComboBox**. - **Syntax** - _object_. **MaxLength** [= _Long_ ] + +## Syntax + +_object_. **MaxLength** [= _Long_ ] The **MaxLength** property syntax has these parts: @@ -26,6 +28,7 @@ The **MaxLength** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. An integer indicating the allowable number of characters.| - **Remarks** +## Remarks + Setting the **MaxLength** property to 0 indicates there is no limit other than that created by memory constraints. diff --git a/Language/Reference/User-Interface-Help/mid-function.md b/Language/Reference/User-Interface-Help/mid-function.md index 6e13f60e085..e208781bb0c 100644 --- a/Language/Reference/User-Interface-Help/mid-function.md +++ b/Language/Reference/User-Interface-Help/mid-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) containing a specified number of characters from a string. - **Syntax** - **Mid** (**_string_**, **_start_** [, **_length_** ]) + +## Syntax + +**Mid** (**_string_**, **_start_** [, **_length_** ]) The **Mid** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,7 +27,8 @@ The **Mid** function syntax has these[named arguments](../../Glossary/vbe-gloss |**_start_**|Required; [Long](../../Glossary/vbe-glossary.md). Character position in **_string_** at which the part to be taken begins. If **_start_** is greater than the number of characters in **_string_**, **Mid** returns a zero-length string ("").| |**_length_**|Optional; **Variant** (**Long**). Number of characters to return. If omitted or if there are fewer than **_length_** characters in the text (including the character at **_start_**), all characters from the **_start_** position to the end of the string are returned.| - **Remarks** +## Remarks + To determine the number of characters in **_string_**, use the **Len** function. **Note** Use the **MidB** function with byte data contained in a string, as in double-byte character set languages. Instead of specifying the number of characters, the[arguments](../../Glossary/vbe-glossary.md) specify numbers of bytes. For sample code that uses **MidB**, see the second example in the example topic. diff --git a/Language/Reference/User-Interface-Help/mid-statement.md b/Language/Reference/User-Interface-Help/mid-statement.md index 61b08d9b9ff..a49166046a3 100644 --- a/Language/Reference/User-Interface-Help/mid-statement.md +++ b/Language/Reference/User-Interface-Help/mid-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Replaces a specified number of characters in a **Variant** (**String**)[variable](../../Glossary/vbe-glossary.md) with characters from another string. - **Syntax** +## Syntax - **Mid** ( _stringvar_, _start_ [, _length_ ]) **=**_string_ +**Mid** ( _stringvar_, _start_ [, _length_ ]) **=**_string_ The **Mid** statement syntax has these parts: @@ -27,7 +27,8 @@ The **Mid** statement syntax has these parts: | _length_|Optional; **Variant** (**Long**). Number of characters to replace. If omitted, all of _string_ is used.| | _string_|Required. [String expression](../../Glossary/vbe-glossary.md) that replaces part of _stringvar_.| - **Remarks** +## Remarks + The number of characters replaced is always less than or equal to the number of characters in _stringvar_. **Note** Use the **MidB** statement with byte data contained in a string. In the **MidB** statement, _start_ specifies the byte position within _stringvar_ where replacement begins and _length_ specifies the numbers of bytes to replace. diff --git a/Language/Reference/User-Interface-Help/minor-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/minor-property-vba-add-in-object-model.md index c98e305dd36..5e1a3d7812f 100644 --- a/Language/Reference/User-Interface-Help/minor-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/minor-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) indicating the minor version number of the referenced[type library](../../Glossary/vbe-glossary.md). Read-only. - **Remarks** + +## Remarks + The number returned by the **Minor** property corresponds to the minor version number stored in the type library to which you have set the reference. diff --git a/Language/Reference/User-Interface-Help/minute-function.md b/Language/Reference/User-Interface-Help/minute-function.md index 9f8c8656050..b6f4cf53c66 100644 --- a/Language/Reference/User-Interface-Help/minute-function.md +++ b/Language/Reference/User-Interface-Help/minute-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Integer**) specifying a whole number between 0 and 59, inclusive, representing the minute of the hour. - **Syntax** - **Minute(**_time_**)** + +## Syntax + +**Minute(**_time_**)** The required _time_[argument](../../Glossary/vbe-glossary.md) is any[Variant](../../Glossary/vbe-glossary.md), [numeric expression](../../Glossary/vbe-glossary.md), [string expression](../../Glossary/vbe-glossary.md), or any combination, that can represent a time. If _time_ contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned. ## Example diff --git a/Language/Reference/User-Interface-Help/mirr-function.md b/Language/Reference/User-Interface-Help/mirr-function.md index de179fea2ae..7a4f0408a08 100644 --- a/Language/Reference/User-Interface-Help/mirr-function.md +++ b/Language/Reference/User-Interface-Help/mirr-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the modified internal rate of return for a series of periodic cash flows (payments and receipts). - **Syntax** - **MIRR( _values_ (),** **_finance_rate_**, **_reinvest_rate_ )** + +## Syntax + +**MIRR( _values_ (),** **_finance_rate_**, **_reinvest_rate_ )** The **MIRR** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,7 +27,8 @@ The **MIRR** function has these[named arguments](../../Glossary/vbe-glossary.md |**_finance_rate_**|Required. **Double** specifying interest rate paid as the cost of financing.| |**_reinvest_rate_**|Required. **Double** specifying interest rate received on gains from cash reinvestment.| - **Remarks** +## Remarks + The modified internal rate of return is the internal rate of return when payments and receipts are financed at different rates. The **MIRR** function takes into account both the cost of the investment (**_finance_rate_**) and the interest rate received on reinvestment of cash (**_reinvest_rate_**). The **_finance_rate_** and **_reinvest_rate_**[arguments](../../Glossary/vbe-glossary.md) are percentages expressed as decimal values. For example, 12 percent is expressed as 0.12. The **MIRR** function uses the order of values within the array to interpret the order of payments and receipts. Be sure to enter your payment and receipt values in the correct sequence. diff --git a/Language/Reference/User-Interface-Help/mkdir-statement.md b/Language/Reference/User-Interface-Help/mkdir-statement.md index 7364720df18..aa9bedeeb47 100644 --- a/Language/Reference/User-Interface-Help/mkdir-statement.md +++ b/Language/Reference/User-Interface-Help/mkdir-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Creates a new directory or folder. - **Syntax** +## Syntax - **MkDir**_path_ +**MkDir**_path_ The required _path_[argument](../../Glossary/vbe-glossary.md) is a[string expression](../../Glossary/vbe-glossary.md) that identifies the directory or folder to be created. The _path_ may include the drive. If no drive is specified, **MkDir** creates the new directory or folder on the current drive. diff --git a/Language/Reference/User-Interface-Help/mod-operator.md b/Language/Reference/User-Interface-Help/mod-operator.md index d554950f50f..f35f0e56bc1 100644 --- a/Language/Reference/User-Interface-Help/mod-operator.md +++ b/Language/Reference/User-Interface-Help/mod-operator.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to divide two numbers and return only the remainder. - **Syntax** - _result_**=**_number1_**Mod**_number2_ + +## Syntax + +_result_**=**_number1_**Mod**_number2_ The **Mod** operator syntax has these parts: @@ -25,7 +27,8 @@ The **Mod** operator syntax has these parts: | _number1_|Required; any [numeric expression](../../Glossary/vbe-glossary.md).| | _number2_|Required; any numeric expression.| - **Remarks** +## Remarks + The modulus, or remainder, operator divides _number1_ by _number2_ (rounding floating-point numbers to integers) and returns only the remainder as _result_. For example, in the following[expression](../../Glossary/vbe-glossary.md), A ( _result_ ) equals 5. Usually, the [data type](../../Glossary/vbe-glossary.md) of _result_ is a[Byte](../../Glossary/vbe-glossary.md), **Byte** variant,[Integer](../../Glossary/vbe-glossary.md), **Integer** variant,[Long](../../Glossary/vbe-glossary.md), or [Variant](../../Glossary/vbe-glossary.md) containing a **Long**, regardless of whether or not _result_ is a whole number. Any fractional portion is truncated. However, if any expression is[Null](../../Glossary/vbe-glossary.md), _result_ is **Null**. Any expression that is[Empty](../../Glossary/vbe-glossary.md) is treated as 0. diff --git a/Language/Reference/User-Interface-Help/month-function.md b/Language/Reference/User-Interface-Help/month-function.md index 7af8b235de2..337677e1c83 100644 --- a/Language/Reference/User-Interface-Help/month-function.md +++ b/Language/Reference/User-Interface-Help/month-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Integer**) specifying a whole number between 1 and 12, inclusive, representing the month of the year. - **Syntax** - **Month(**_date_**)** + +## Syntax + +**Month(**_date_**)** The required _date_[argument](../../Glossary/vbe-glossary.md) is any[Variant](../../Glossary/vbe-glossary.md), [numeric expression](../../Glossary/vbe-glossary.md), [string expression](../../Glossary/vbe-glossary.md), or any combination, that can represent a date. If _date_ contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned. **Note** If the **Calendar** property setting is Gregorian, the returned integer represents the Gregorian day of the week for the date argument. If the calendar is Hijri, the returned integer represents the Hijri day of the week for the date argument. For Hijri dates, the argument number is any numeric expression that can represent a date and/or time from 1/1/100 (Gregorian Aug 2, 718) through 4/3/9666 (Gregorian Dec 31, 9999). diff --git a/Language/Reference/User-Interface-Help/monthname-function.md b/Language/Reference/User-Interface-Help/monthname-function.md index 7343f9f3261..d5537355048 100644 --- a/Language/Reference/User-Interface-Help/monthname-function.md +++ b/Language/Reference/User-Interface-Help/monthname-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns a string indicating the specified month. - **Syntax** - **MonthName(**_month_ [ **,**_abbreviate_ ] **)** + +## Syntax + +**MonthName(**_month_ [ **,**_abbreviate_ ] **)** The **MonthName** function syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/mousedown-mouseup-events.md b/Language/Reference/User-Interface-Help/mousedown-mouseup-events.md index 452ddaf3a5d..8d8fbe3ea4e 100644 --- a/Language/Reference/User-Interface-Help/mousedown-mouseup-events.md +++ b/Language/Reference/User-Interface-Help/mousedown-mouseup-events.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Occur when the user clicks a mouse button. MouseDown occurs when the user presses the mouse button; MouseUp occurs when the user releases the mouse button. - **Syntax** + +## Syntax + For MultiPage, TabStrip **Private Sub**_object_ _**MouseDown(**_index_**As Long**, **ByVal**_Button_**As fmButton**, **ByVal**_Shift_**As fmShiftState**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single)** **Private Sub**_object_ _**MouseUp(**_index_**As Long**, **ByVal**_Button_**As fmButton**, **ByVal**_Shift_**As fmShiftState**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single)** For other controls **Private Sub**_object_ _**MouseDown( ByVal**_Button_**As fmButton**, **ByVal**_Shift_**As fmShiftState**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single)** **Private Sub**_object_ _**MouseUp( ByVal**_Button_**As fmButton**, **ByVal**_Shift_**As fmShiftState**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single)** The **MouseDown** and **MouseUp** event syntaxes have these parts: @@ -60,7 +62,8 @@ You can identify individual keyboard modifiers by using the following constants: | _fmCtrlMask_|2|Mask to detect CTRL.| | _fmAltMask_|4|Mask to detect ALT.| - **Remarks** +## Remarks + For a **MultiPage**, the MouseDown event occurs when the user presses a mouse button over the control. For a **TabStrip**, the index argument identifies the tab where the user clicked. An index of -1 indicates the user did not click a tab. For example, if there are no tabs in the upper right corner of the control, clicking in the upper right corner sets the index to -1. For a form, the user can generate MouseDown and MouseUp events by pressing and releasing a mouse button in a blank area, record selector, or scroll bar on the form. diff --git a/Language/Reference/User-Interface-Help/mouseicon-property.md b/Language/Reference/User-Interface-Help/mouseicon-property.md index e95ae886638..3ce0ba213f7 100644 --- a/Language/Reference/User-Interface-Help/mouseicon-property.md +++ b/Language/Reference/User-Interface-Help/mouseicon-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Assigns a custom icon to an object. - **Syntax** - _object_. **MouseIcon** = **LoadPicture(**_pathname_**)** + +## Syntax + +_object_. **MouseIcon** = **LoadPicture(**_pathname_**)** The **MouseIcon** property syntax has these parts: @@ -26,7 +28,8 @@ The **MouseIcon** property syntax has these parts: | _object_|Required. A valid object.| | _pathname_|Required. A string expression specifying the path and filename of the file containing the custom icon.| - **Remarks** +## Remarks + The **MouseIcon** property is valid when the **MousePointer** property is set to 99. The mouse icon of an object is the image that appears when the user moves the mouse across that object. To assign an image for the mouse pointer, you can either assign a picture to the **MouseIcon** property or load a picture from a file using the **LoadPicture** function. diff --git a/Language/Reference/User-Interface-Help/mousemove-event.md b/Language/Reference/User-Interface-Help/mousemove-event.md index 1550b3d0f4a..550cf49b3b6 100644 --- a/Language/Reference/User-Interface-Help/mousemove-event.md +++ b/Language/Reference/User-Interface-Help/mousemove-event.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Occurs when the user moves the mouse. - **Syntax** + +## Syntax + For MultiPage, TabStrip **Private Sub**_object_ _**MouseMove(**_index_**As Long**, **ByVal**_Button_**As fmButton**, **ByVal**_Shift_**As fmShiftState**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single)** For other controls **Private Sub**_object_ _**MouseMove( ByVal**_Button_**As fmButton**, **ByVal**_Shift_**As fmShiftState**, **ByVal**_X_**As Single**, **ByVal**_Y_**As Single)** The **MouseMove** event syntax has these parts: @@ -68,7 +70,8 @@ You can identify individual keyboard modifiers by using the following constants: | _fmCtrlMask_|2|Mask to detect CTRL.| | _fmAltMask_|4|Mask to detect ALT.| - **Remarks** +## Remarks + The MouseMove event applies to forms, controls on a form, and labels. MouseMove events are generated continually as the mouse pointer moves across objects. Unless another object has captured the mouse, an object recognizes a MouseMove event whenever the mouse position is within its borders. Moving a form can also generate a MouseMove event even if the mouse is stationary. MouseMove events are generated when the form moves underneath the pointer. If a macro or event procedure moves a form in response to a MouseMove event, the event can continually generate (cascade) MouseMove events. diff --git a/Language/Reference/User-Interface-Help/mousepointer-property.md b/Language/Reference/User-Interface-Help/mousepointer-property.md index 00d685fa651..e24067d04f4 100644 --- a/Language/Reference/User-Interface-Help/mousepointer-property.md +++ b/Language/Reference/User-Interface-Help/mousepointer-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the type of pointer displayed when the user positions the mouse over a particular object. - **Syntax** - _object_. **MousePointer** [= _fmMousePointer_ ] + +## Syntax + +_object_. **MousePointer** [= _fmMousePointer_ ] The **MousePointer** property syntax has these parts: @@ -48,7 +50,8 @@ The settings for _fmMousePointer_ are: | _fmMousePointerSizeAll_|15|Size all cursor (arrows pointing north, south, east, and west).| | _fmMousePointerCustom_|99|Uses the icon specified by the **MouseIcon** property.| - **Remarks** +## Remarks + Use the **MousePointer** property when you want to indicate changes in functionality as the mouse pointer passes over controls on a form. For example, the hourglass setting (11) is useful to indicate that the user must wait for a process or operation to finish. Some icons vary depending on system settings, such as the icons associated with desktop themes. diff --git a/Language/Reference/User-Interface-Help/move-method-filesystemobject-object.md b/Language/Reference/User-Interface-Help/move-method-filesystemobject-object.md index e8d7988d61a..f137e7cb0b5 100644 --- a/Language/Reference/User-Interface-Help/move-method-filesystemobject-object.md +++ b/Language/Reference/User-Interface-Help/move-method-filesystemobject-object.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Moves a specified file or folder from one location to another. - **Syntax** - _object_. **Move**_destination_ + +## Syntax + +_object_. **Move**_destination_ The **Move** method syntax has these parts: @@ -25,6 +27,7 @@ The **Move** method syntax has these parts: | _object_|Required. Always the name of a **File** or **Folder** object.| | _destination_|Required. Destination where the file or folder is to be moved. Wildcard characters are not allowed.| - **Remarks** +## Remarks + The results of the **Move** method on a **File** or **Folder** are identical to operations performed using **FileSystemObject.MoveFile** or **FileSystemObject.MoveFolder**. You should note, however, that the alternative methods are capable of moving multiple files or folders. diff --git a/Language/Reference/User-Interface-Help/move-method.md b/Language/Reference/User-Interface-Help/move-method.md index 997576cb3b1..e0402abfbd3 100644 --- a/Language/Reference/User-Interface-Help/move-method.md +++ b/Language/Reference/User-Interface-Help/move-method.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Moves a form or control, or moves all the controls in the **Controls** collection. - **Syntax** + +## Syntax + For a form or control _object_. **Move(** [ _Left_ [, _Top_ [, _Width_ [, _Height_ [, _Layout_ ]]]]] **)** For the Controls collection _object_. **Move(** X, Y **)** The **Move** method syntax has these parts: @@ -34,7 +36,9 @@ The **Move** method syntax has these parts: **Settings** The maximum and minimum values for the _Left_, _Top_, _Width_, _Height_, _X_, and _Y_ arguments vary from one application to another. - **Remarks** + +## Remarks + For a form or control, you can move a selection to a specific location relative to the edges of the form that contains the selection. You can use [named arguments](../../Glossary/vbe-glossary.md), or you can enter the arguments by position. If you use named arguments, you can list the arguments in any order. If not, you must enter the arguments in the order shown, using commas to indicate the relative position of arguments you do not specify. Any unspecified arguments remain unchanged. For the **Controls** collection, you can move all the controls in this collection a specific distance from their current positions on a form, **Frame**, or **Page**. diff --git a/Language/Reference/User-Interface-Help/movefile-method.md b/Language/Reference/User-Interface-Help/movefile-method.md index 775564fe54c..3d94dba88eb 100644 --- a/Language/Reference/User-Interface-Help/movefile-method.md +++ b/Language/Reference/User-Interface-Help/movefile-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Moves one or more files from one location to another. - **Syntax** - _object_. **MoveFile**_source_, _destination_ + +## Syntax + +_object_. **MoveFile**_source_, _destination_ The **MoveFile** method syntax has these parts: @@ -28,7 +30,8 @@ The **MoveFile** method syntax has these parts: | _source_|Required. The path to the file or files to be moved. The _source_ argument string can contain wildcard characters in the last path component only.| | _destination_|Required. The path where the file or files are to be moved. The _destination_ argument can't contain wildcard characters.| - **Remarks** +## Remarks + If _source_ contains wildcards or _destination_ ends with a path separator (**\**), it is assumed that _destination_ specifies an existing folder in which to move the matching files. Otherwise, _destination_ is assumed to be the name of a destination file to create. In either case, three things can happen when an individual file is moved: diff --git a/Language/Reference/User-Interface-Help/movefolder-method.md b/Language/Reference/User-Interface-Help/movefolder-method.md index cbd70b8d0c3..c51f17c551b 100644 --- a/Language/Reference/User-Interface-Help/movefolder-method.md +++ b/Language/Reference/User-Interface-Help/movefolder-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Moves one or more folders from one location to another. - **Syntax** - _object_. **MoveFolder**_source_, _destination_ + +## Syntax + +_object_. **MoveFolder**_source_, _destination_ The **MoveFolder** method syntax has these parts: @@ -28,7 +30,8 @@ The **MoveFolder** method syntax has these parts: | _source_|Required. The path to the folder or folders to be moved. The _source_ argument string can contain wildcard characters in the last path component only.| | _destination_|Required. The path where the folder or folders are to be moved. The _destination_ argument can't contain wildcard characters.| - **Remarks** +## Remarks + If _source_ contains wildcards or _destination_ ends with a path separator (**\**), it is assumed that _destination_ specifies an existing folder in which to move the matching files. Otherwise, _destination_ is assumed to be the name of a destination folder to create. In either case, three things can happen when an individual folder is moved: diff --git a/Language/Reference/User-Interface-Help/msgbox-function.md b/Language/Reference/User-Interface-Help/msgbox-function.md index 974cba7f73e..ff7ee540094 100644 --- a/Language/Reference/User-Interface-Help/msgbox-function.md +++ b/Language/Reference/User-Interface-Help/msgbox-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Displays a message in a dialog box, waits for the user to click a button, and returns an **Integer** indicating which button the user clicked. - **Syntax** - **MsgBox( _prompt_** [, **_buttons_** ] [, **_title_** ] [, **_helpfile_**, **_context_** ] **)** + +## Syntax + +**MsgBox( _prompt_** [, **_buttons_** ] [, **_title_** ] [, **_helpfile_**, **_context_** ] **)** The **MsgBox** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -71,7 +73,8 @@ The first group of values (0-5) describes the number and type of buttons display |**vbYes**|6|**Yes**| |**vbNo**|7|**No**| - **Remarks** +## Remarks + When both **_helpfile_** and **_context_** are provided, the user can press F1 (Windows) or HELP (Macintosh) to view the Help topic corresponding to the **context**. Some[host applications](../../Glossary/vbe-glossary.md), for example, Microsoft Excel, also automatically add a **Help** button to the dialog box. If the dialog box displays a **Cancel** button, pressing the ESC key has the same effect as clicking **Cancel**. If the dialog box contains a **Help** button, context-sensitive Help is provided for the dialog box. However, no value is returned until one of the other buttons is clicked. diff --git a/Language/Reference/User-Interface-Help/multiline-property.md b/Language/Reference/User-Interface-Help/multiline-property.md index 75c852b5ded..82acd460e3b 100644 --- a/Language/Reference/User-Interface-Help/multiline-property.md +++ b/Language/Reference/User-Interface-Help/multiline-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether a control can accept and display multiple lines of text. - **Syntax** - _object_. **MultiLine** [= _Boolean_ ] + +## Syntax + +_object_. **MultiLine** [= _Boolean_ ] The **MultiLine** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|The text is displayed across multiple lines (default).| |**False**|The text is not displayed across multiple lines.| - **Remarks** +## Remarks + A multiline **TextBox** allows absolute line breaks and adjusts its quantity of lines to accommodate the amount of text it holds. If needed, a multiline control can have vertical scroll bars. A single-line **TextBox** doesn't allow absolute line breaks and doesn't use vertical scroll bars. Single-line controls ignore the value of the **WordWrap** property. diff --git a/Language/Reference/User-Interface-Help/multipage-control.md b/Language/Reference/User-Interface-Help/multipage-control.md index 79e458b5321..c1b6334dd64 100644 --- a/Language/Reference/User-Interface-Help/multipage-control.md +++ b/Language/Reference/User-Interface-Help/multipage-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Presents multiple screens of information as a single set. - **Remarks** + +## Remarks + A **MultiPage** is useful when you work with a large amount of information that can be sorted into several categories. For example, use a **MultiPage** to display information from an employment application. One page might contain personal information such as name and address; another page might list previous employers; a third page might list references. The **MultiPage** lets you visually combine related information, while keeping the entire record readily accessible. New pages are added to the right of the currently selected page rather than adjacent to it. diff --git a/Language/Reference/User-Interface-Help/multirow-property.md b/Language/Reference/User-Interface-Help/multirow-property.md index 8ee6e70c910..3dc319c1b6a 100644 --- a/Language/Reference/User-Interface-Help/multirow-property.md +++ b/Language/Reference/User-Interface-Help/multirow-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether the control has more than one row of tabs. - **Syntax** - _object_. **MultiRow** [= _Boolean_ ] + +## Syntax + +_object_. **MultiRow** [= _Boolean_ ] The **MultiRow** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|Allows more than one row of tabs.| |**False**|Restricts tabs to a single row (default).| - **Remarks** +## Remarks + The width and number of tabs determines the number of rows. Changing the control's size also changes the number of rows. This allows the developer to resize the control and ensure that tabs wrap to fit the control. If the **MultiRow** property is **False**, then truncation occurs if the width of the tabs exceeds the width of the control. If **MultiRow** is **False** and tabs are truncated, there will be a small scroll bar on the **TabStrip** to allow scrolling to the other tabs or pages. diff --git a/Language/Reference/User-Interface-Help/multiselect-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/multiselect-property-microsoft-forms.md index ed0a7538d15..0b9ebc74ca5 100644 --- a/Language/Reference/User-Interface-Help/multiselect-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/multiselect-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Indicates whether the object permits multiple selections. - **Syntax** - _object_. **MultiSelect** [= _fmMultiSelect_ ] + +## Syntax + +_object_. **MultiSelect** [= _fmMultiSelect_ ] The **MultiSelect** property syntax has these parts: @@ -34,7 +36,8 @@ The settings for _fmMultiSelect_ are: | _fmMultiSelectMulti_|1|Pressing the SPACEBAR or clicking selects or deselects an item in the list.| | _fmMultiSelectExtended_|2|Pressing SHIFT and clicking the mouse, or pressing SHIFT and one of the arrow keys, extends the selection from the previously selected item to the current item. Pressing CTRL and clicking the mouse selects or deselects an item.| - **Remarks** +## Remarks + When the **MultiSelect** property is set to _Extended_ or _Simple_, you must use the list box's **Selected** property to determine the selected items. Also, the **Value** property of the control is always **Null**. The **ListIndex** property returns the index of the row with the keyboard[focus](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/name-property-filesystemobject-object.md b/Language/Reference/User-Interface-Help/name-property-filesystemobject-object.md index 5e83dcf9415..db8ba158996 100644 --- a/Language/Reference/User-Interface-Help/name-property-filesystemobject-object.md +++ b/Language/Reference/User-Interface-Help/name-property-filesystemobject-object.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Sets or returns the name of a specified file or folder. Read/write. - **Syntax** - _object_. **Name** [= _newname_ ] + +## Syntax + +_object_. **Name** [= _newname_ ] The **Name** property has these parts: @@ -25,7 +27,8 @@ The **Name** property has these parts: | _object_|Required. Always the name of a **File** or **Folder** object.| | _newname_|Optional. If provided, _newname_ is the new name of the specified _object_.| - **Remarks** +## Remarks + The following code illustrates the use of the **Name** property: diff --git a/Language/Reference/User-Interface-Help/name-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/name-property-vba-add-in-object-model.md index e561485c5f4..661f9d91c95 100644 --- a/Language/Reference/User-Interface-Help/name-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/name-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a [String](../../Glossary/vbe-glossary.md) containing the name used in code to identify an object. For the **VBProject** object and the **VBComponent** object, read/write; for the **Property** object and the **Reference** object, read-only. - **Remarks** + +## Remarks + The following table describes how the **Name** property setting applies to different objects. diff --git a/Language/Reference/User-Interface-Help/name-propertye-microsoft-forms.md b/Language/Reference/User-Interface-Help/name-propertye-microsoft-forms.md index fdb14001137..5af0e6096a9 100644 --- a/Language/Reference/User-Interface-Help/name-propertye-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/name-propertye-microsoft-forms.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Specifies the name of a control or an object, or the name of a font to associate with a **Font** object. - **Syntax** + +## Syntax + For Font _Font_. **Name** [= _String_ ] For all other controls and objects _object_. **Name** [= _String_ ] The **Name** property syntax has these parts: @@ -27,7 +29,9 @@ The **Name** property syntax has these parts: **Settings** Guidelines for assigning a string to **Name**, such as the maximum length of the name, vary from one application to another. - **Remarks** + +## Remarks + For objects, the default value of **Name** consists of the object's[class](../../Glossary/vbe-glossary.md) name followed by an integer. For example, the default name for the first **TextBox** you place on a form is TextBox1. The default name for the second **TextBox** is TextBox2. You can set the **Name** property for a control from the control's property sheet or, for controls added at[run time](../../Glossary/vbe-glossary.md), by using program statements. If you add a control at [design time](../../Glossary/vbe-glossary.md), you cannot modify its **Name** property at run time. Each control added to a form at design time must have a unique name. diff --git a/Language/Reference/User-Interface-Help/name-statement.md b/Language/Reference/User-Interface-Help/name-statement.md index d5e483664e8..0efdc7bcee8 100644 --- a/Language/Reference/User-Interface-Help/name-statement.md +++ b/Language/Reference/User-Interface-Help/name-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Renames a disk file, directory, or folder. - **Syntax** +## Syntax - **Name**_oldpathname_**As**_newpathname_ +**Name**_oldpathname_**As**_newpathname_ The **Name** statement syntax has these parts: @@ -25,7 +25,8 @@ The **Name** statement syntax has these parts: | _oldpathname_|Required. [String expression](../../Glossary/vbe-glossary.md) that specifies the existing file name and location — may include directory or folder, and drive.| | _newpathname_|Required. String expression that specifies the new file name and location — may include directory or folder, and drive. The file name specified by _newpathname_ can't already exist.| - **Remarks** +## Remarks + The Name statement renames a file and moves it to a different directory or folder, if necessary. Name can move a file across drives, but it can only rename an existing directory or folder when both newpathname and oldpathname are located on the same drive. Name cannot create a new file, directory, or folder. Using **Name** on an open file produces an error. You must close an open file before renaming it. **Name**[arguments](../../Glossary/vbe-glossary.md) cannot include multiple-character (**\***) and single-character (**?**) wildcards. diff --git a/Language/Reference/User-Interface-Help/new-toolbar-dialog-box.md b/Language/Reference/User-Interface-Help/new-toolbar-dialog-box.md index 95bd6efb580..f1e02f9bf78 100644 --- a/Language/Reference/User-Interface-Help/new-toolbar-dialog-box.md +++ b/Language/Reference/User-Interface-Help/new-toolbar-dialog-box.md @@ -18,7 +18,7 @@ ms.date: 06/08/2017 Allows you to give your new toolbar a name. -## Dialog Box Option +## Dialog Box Options **Toolbar name** diff --git a/Language/Reference/User-Interface-Help/not-operator.md b/Language/Reference/User-Interface-Help/not-operator.md index 477ac2cf1f3..245a438a3b0 100644 --- a/Language/Reference/User-Interface-Help/not-operator.md +++ b/Language/Reference/User-Interface-Help/not-operator.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to perform logical negation on an [expression](../../Glossary/vbe-glossary.md). - **Syntax** - _result_**=** **Not**_expression_ + +## Syntax + +_result_**=** **Not**_expression_ The **Not** operator syntax has these parts: @@ -24,7 +26,8 @@ The **Not** operator syntax has these parts: | _result_|Required; any numeric [variable](../../Glossary/vbe-glossary.md).| | _expression_|Required; any expression.| - **Remarks** +## Remarks + The following table illustrates how _result_ is determined: diff --git a/Language/Reference/User-Interface-Help/now-function.md b/Language/Reference/User-Interface-Help/now-function.md index ac64eb7b499..0379eb6120b 100644 --- a/Language/Reference/User-Interface-Help/now-function.md +++ b/Language/Reference/User-Interface-Help/now-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Date**) specifying the current date and time according your computer's system date and time. - **Syntax** - **Now** + +## Syntax + +**Now** ## Example diff --git a/Language/Reference/User-Interface-Help/nper-function.md b/Language/Reference/User-Interface-Help/nper-function.md index a4bde653488..10ab6aa8738 100644 --- a/Language/Reference/User-Interface-Help/nper-function.md +++ b/Language/Reference/User-Interface-Help/nper-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the number of periods for an annuity based on periodic, fixed payments and a fixed interest rate. - **Syntax** - **NPer( _rate_**, **_pmt_**, **_pv_** [, **_fv_** [, **_type_** ]] **)** + +## Syntax + +**NPer( _rate_**, **_pmt_**, **_pv_** [, **_fv_** [, **_type_** ]] **)** The **NPer** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -27,7 +29,8 @@ The **NPer** function has these[named arguments](../../Glossary/vbe-glossary.md |**_fv_**|Optional. [Variant](../../Glossary/vbe-glossary.md) specifying future value or cash balance you want after you've made the final payment. For example, the future value of a loan is $0 because that's its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.| |**_type_**|Optional. **Variant** specifying when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.| - **Remarks** +## Remarks + An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan). For all [arguments](../../Glossary/vbe-glossary.md), cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers. diff --git a/Language/Reference/User-Interface-Help/npv-function.md b/Language/Reference/User-Interface-Help/npv-function.md index 58a67e606d7..72ff99e0ec2 100644 --- a/Language/Reference/User-Interface-Help/npv-function.md +++ b/Language/Reference/User-Interface-Help/npv-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the net present value of an investment based on a series of periodic cash flows (payments and receipts) and a discount rate. - **Syntax** - **NPV( _rate_**, **_values_ ())** + +## Syntax + +**NPV( _rate_**, **_values_ ())** The **NPV** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -24,7 +26,8 @@ The **NPV** function has these[named arguments](../../Glossary/vbe-glossary.md) |**_rate_**|Required. **Double** specifying discount rate over the length of the period, expressed as a decimal.| |**_values_ ()**|Required. [Array](../../Glossary/vbe-glossary.md) of **Double** specifying cash flow values. The array must contain at least one negative value (a payment) and one positive value (a receipt).| - **Remarks** +## Remarks + The net present value of an investment is the current value of a future series of payments and receipts. The **NPV** function uses the order of values within the array to interpret the order of payments and receipts. Be sure to enter your payment and receipt values in the correct sequence. The **NPV** investment begins one period before the date of the first cash flow value and ends with the last cash flow value in the array. diff --git a/Language/Reference/User-Interface-Help/number-property-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/number-property-visual-basic-for-applications.md index a67787cc84c..55bcd1ad97f 100644 --- a/Language/Reference/User-Interface-Help/number-property-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/number-property-visual-basic-for-applications.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a numeric value specifying an error. **Number** is the **Err** object's default property. Read/write. - **Remarks** + +## Remarks + When returning a user-defined error from an object, set **Err.Number** by adding the number you selected as an error code to the **vbObjectError**[constant](../../Glossary/vbe-glossary.md). For example, you use the following code to return the number 1051 as an error code: diff --git a/Language/Reference/User-Interface-Help/numindices-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/numindices-property-vba-add-in-object-model.md index cf085cad121..65706234dc3 100644 --- a/Language/Reference/User-Interface-Help/numindices-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/numindices-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns the number of indices on the [property](../../Glossary/vbe-glossary.md) returned by the **Property** object. - **Remarks** + +## Remarks + The value of the **NumIndices** property can be an integer from 0 - 4. For most properties, **NumIndices** returns 0. Conventionally indexed properties return 1. Property[arrays](../../Glossary/vbe-glossary.md) might return 2. diff --git a/Language/Reference/User-Interface-Help/object-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/object-property-vba-add-in-object-model.md index b8c05db0536..3fedf81808a 100644 --- a/Language/Reference/User-Interface-Help/object-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/object-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns or sets the value of an object returned by a [property](../../Glossary/vbe-glossary.md). Read/write. - **Remarks** + +## Remarks + If a property returns an object, you must use the **Object** property to return or set the value of that object. diff --git a/Language/Reference/User-Interface-Help/object-property.md b/Language/Reference/User-Interface-Help/object-property.md index f8a7225c9ba..6fd0a3fcbda 100644 --- a/Language/Reference/User-Interface-Help/object-property.md +++ b/Language/Reference/User-Interface-Help/object-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Overrides a standard property or method when a new control has a property or method of the same name. - **Syntax** - _object_. **Object** [. _property_ |. _method_ ] + +## Syntax + +_object_. **Object** [. _property_ |. _method_ ] The **Object** property syntax has these parts: @@ -27,7 +29,8 @@ The **Object** property syntax has these parts: | _property_|Optional. A property that has the same name as a standard Microsoft Forms property.| | _method_|Optional. A method that has the same name as a standard Microsoft Forms method.| - **Remarks** - **Object** is read-only. +## Remarks + +**Object** is read-only. If you add a new control to the Microsoft Forms Toolbox, it is possible that the added control will have a property or method with the same name as a standard Microsoft Forms property or method. The **Object** property lets you use the property or method from the added control, rather than the standard property or method. diff --git a/Language/Reference/User-Interface-Help/oct-function.md b/Language/Reference/User-Interface-Help/oct-function.md index c28785e5aab..2a3f9e91b2c 100644 --- a/Language/Reference/User-Interface-Help/oct-function.md +++ b/Language/Reference/User-Interface-Help/oct-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) representing the octal value of a number. - **Syntax** - **Oct** ( _number_ ) + +## Syntax + +**Oct** ( _number_ ) The required _number_[argument](../../Glossary/vbe-glossary.md) is any valid[numeric expression](../../Glossary/vbe-glossary.md) or[string expression](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + If _number_ is not already a whole number, it is rounded to the nearest whole number before being evaluated. diff --git a/Language/Reference/User-Interface-Help/oldheight-oldwidth-properties.md b/Language/Reference/User-Interface-Help/oldheight-oldwidth-properties.md index a387c75ed14..affe33ff406 100644 --- a/Language/Reference/User-Interface-Help/oldheight-oldwidth-properties.md +++ b/Language/Reference/User-Interface-Help/oldheight-oldwidth-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns the previous height or width, in [points](../../Glossary/vbe-glossary.md), of the control. - **Syntax** - _object_. **OldHeight** + +## Syntax + +_object_. **OldHeight** _object_. **OldWidth** The **OldHeight** and **OldWidth** property syntaxes have these parts: @@ -24,8 +26,9 @@ The **OldHeight** and **OldWidth** property syntaxes have these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** - **OldHeight** and **OldWidth** are read-only. +## Remarks + +**OldHeight** and **OldWidth** are read-only. The **OldHeight** and **OldWidth** properties are automatically updated when you move or size a control. If you change the size of a control, the **Height** and **Width** properties store the new height and **OldHeight** and **OldWidth** store the previous height. These properties are valid only in the Layout event. diff --git a/Language/Reference/User-Interface-Help/oldleft-oldtop-properties.md b/Language/Reference/User-Interface-Help/oldleft-oldtop-properties.md index 718688e0804..6aafdd7e68a 100644 --- a/Language/Reference/User-Interface-Help/oldleft-oldtop-properties.md +++ b/Language/Reference/User-Interface-Help/oldleft-oldtop-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns the distance, in [points](../../Glossary/vbe-glossary.md), between the previous position of a control and the left or top edge of the form that contains it. - **Syntax** - _object_. **OldLeft** + +## Syntax + +_object_. **OldLeft** _object_. **OldTop** The **OldLeft** and **OldTop** property syntaxes have these parts: @@ -24,8 +26,9 @@ The **OldLeft** and **OldTop** property syntaxes have these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** - **OldLeft** and **OldTop** are read-only. +## Remarks + +**OldLeft** and **OldTop** are read-only. The **OldLeft** and **OldTop** properties are automatically updated when you move or size a control. If you move a control, the **Left** and **Top** properties store the new distance from the control to the left edge of its[container](../../Glossary/vbe-glossary.md) and **OldLeft** and **OldTop** store the previous value of **Left**. **OldLeft** and **OldTop** are valid only in the Layout event. diff --git a/Language/Reference/User-Interface-Help/on-error-statement.md b/Language/Reference/User-Interface-Help/on-error-statement.md index 80a5a111507..fec33fba6cf 100644 --- a/Language/Reference/User-Interface-Help/on-error-statement.md +++ b/Language/Reference/User-Interface-Help/on-error-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Enables an error-handling routine and specifies the location of the routine within a [procedure](../../Glossary/vbe-glossary.md); can also be used to disable an error-handling routine. - **Syntax** +## Syntax - **On Error** **GoTo**_line_ +**On Error** **GoTo**_line_ **On Error** **Resume Next** **On Error** **GoTo** **0** @@ -28,7 +28,8 @@ The **On Error** statement syntax can have any of the following forms: |**On Error Resume Next**|Specifies that when a run-time error occurs, control goes to the [statement](../../Glossary/vbe-glossary.md) immediately following the statement where the error occurred where execution continues. Use this form rather than **On Error GoTo** when accessing objects.| |**On Error GoTo 0**|Disables any enabled error handler in the current procedure.| - **Remarks** +## Remarks + If you don't use an **On Error** statement, any run-time error that occurs is fatal; that is, an error message is displayed and execution stops. An "enabled" error handler is one that is turned on by an **On Error** statement; an "active" error handler is an enabled handler that is in the process of handling an error. If an error occurs while an error handler is active (between the occurrence of the error and a **Resume**, **Exit Sub**, **Exit Function**, or **Exit Property** statement), the current procedure's error handler can't handle the error. Control returns to the calling procedure. If the calling procedure has an enabled error handler, it is activated to handle the error. If the calling procedure's error handler is also active, control passes back through previous calling procedures until an enabled, but inactive, error handler is found. If no inactive, enabled error handler is found, the error is fatal at the point at which it actually occurred. Each time the error handler passes control back to a calling procedure, that procedure becomes the current procedure. Once an error is handled by an error handler in any procedure, execution resumes in the current procedure at the point designated by the **Resume** statement. diff --git a/Language/Reference/User-Interface-Help/ongosub-ongoto-statements.md b/Language/Reference/User-Interface-Help/ongosub-ongoto-statements.md index 45e0d3b7363..4d4d06121cc 100644 --- a/Language/Reference/User-Interface-Help/ongosub-ongoto-statements.md +++ b/Language/Reference/User-Interface-Help/ongosub-ongoto-statements.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Branch to one of several specified lines, depending on the value of an [expression](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **On**_expression_**GoSub**_destinationlist_ +**On**_expression_**GoSub**_destinationlist_ **On**_expression_**GoTo**_destinationlist_ The **On...GoSub** and **On...GoTo** statement syntax has these parts: @@ -26,7 +26,8 @@ The **On...GoSub** and **On...GoTo** statement syntax has these parts: | _expression_|Required. Any [numeric expression](../../Glossary/vbe-glossary.md) that evaluates to a whole number between 0 and 255, inclusive. If _expression_ is any number other than a whole number, it is rounded before it is evaluated.| | _destinationlist_|Required. List of [line numbers](../../Glossary/vbe-glossary.md) or[line labels](../../Glossary/vbe-glossary.md) separated by commas.| - **Remarks** +## Remarks + The value of _expression_ determines which line is branched to in _destinationlist_. If the value of _expression_ is less than 1 or greater than the number of items in the list, one of the following results occurs: diff --git a/Language/Reference/User-Interface-Help/open-statement.md b/Language/Reference/User-Interface-Help/open-statement.md index 49fcba68ccb..fbbfdd0dc95 100644 --- a/Language/Reference/User-Interface-Help/open-statement.md +++ b/Language/Reference/User-Interface-Help/open-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Enables input/output (I/O) to a file. - **Syntax** +## Syntax - **Open**_pathname_**For**_mode_ [ **Access**_access_ ] [ _lock_ ] **As** [ **#** ] _filenumber_ [ **Len** = _reclength_ ] +**Open**_pathname_**For**_mode_ [ **Access**_access_ ] [ _lock_ ] **As** [ **#** ] _filenumber_ [ **Len** = _reclength_ ] The **Open** statement syntax has these parts: @@ -29,7 +29,8 @@ The **Open** statement syntax has these parts: | _filenumber_|Required. A valid [file number](../../Glossary/vbe-glossary.md) in the range 1 to 511, inclusive. Use the **FreeFile** function to obtain the next available file number.| | _reclength_|Optional. Number less than or equal to 32,767 (bytes). For files opened for random access, this value is the record length. For sequential files, this value is the number of characters buffered.| - **Remarks** +## Remarks + You must open a file before any I/O operation can be performed on it. **Open** allocates a buffer for I/O to the file and determines the mode of access to use with the buffer. If the file specified by _pathname_ doesn't exist, it is created when a file is opened for **Append**, **Binary**, **Output**, or **Random** modes. If the file is already opened by another process and the specified type of access is not allowed, the **Open** operation fails and an error occurs. diff --git a/Language/Reference/User-Interface-Help/openastextstream-method.md b/Language/Reference/User-Interface-Help/openastextstream-method.md index eea21b31857..f3b260f9e7b 100644 --- a/Language/Reference/User-Interface-Help/openastextstream-method.md +++ b/Language/Reference/User-Interface-Help/openastextstream-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Opens a specified file and returns a **TextStream** object that can be used to read from, write to, or append to the file. - **Syntax** - _object_. **OpenAsTextStream(** [ _iomode_, [ _format_ ]] **)** + +## Syntax + +_object_. **OpenAsTextStream(** [ _iomode_, [ _format_ ]] **)** The **OpenAsTextStream** method syntax has these parts: @@ -47,7 +49,8 @@ The _format_ argument can have any of the following settings: |**TristateTrue**|-1|Opens the file as Unicode.| |**TristateFalse**| 0|Opens the file as ASCII.| - **Remarks** +## Remarks + The **OpenAsTextStream** method provides the same functionality as the **OpenTextFile** method of the **FileSystemObject**. In addition, the **OpenAsTextStream** method can be used to write to a file. The following code illustrates the use of the **OpenAsTextStream** method: diff --git a/Language/Reference/User-Interface-Help/opentextfile-method.md b/Language/Reference/User-Interface-Help/opentextfile-method.md index 20badfcd922..cff3061d9ae 100644 --- a/Language/Reference/User-Interface-Help/opentextfile-method.md +++ b/Language/Reference/User-Interface-Help/opentextfile-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Opens a specified file and returns a **TextStream** object that can be used to read from or append to the file. - **Syntax** - _object_. **OpenTextFile(**_filename_ [ **,**_iomode_ [ **,**_create_ [ **,**_format_ ]]] **)** + +## Syntax + +_object_. **OpenTextFile(**_filename_ [ **,**_iomode_ [ **,**_create_ [ **,**_format_ ]]] **)** The **OpenTextFile** method has these parts: @@ -48,7 +50,8 @@ The _format_ argument can have any of the following settings: |**TristateTrue**|-1|Opens the file as Unicode.| |**TristateFalse**| 0|Opens the file as ASCII.| - **Remarks** +## Remarks + The following code illustrates the use of the **OpenTextFile** method to open a file for appending text: diff --git a/Language/Reference/User-Interface-Help/operator.md b/Language/Reference/User-Interface-Help/operator.md index b045ee382d9..4131b9b73bf 100644 --- a/Language/Reference/User-Interface-Help/operator.md +++ b/Language/Reference/User-Interface-Help/operator.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to multiply two numbers. - **Syntax** - _result_**=**_number1_ * _number2_ + +## Syntax + +_result_**=**_number1_ * _number2_ The **\*** operator syntax has these parts: @@ -25,7 +27,8 @@ The **\*** operator syntax has these parts: | _number1_|Required; any [numeric expression](../../Glossary/vbe-glossary.md).| | _number2_|Required; any numeric expression.| - **Remarks** +## Remarks + The [data type](../../Glossary/vbe-glossary.md) of _result_ is usually the same as that of the most precise[expression](../../Glossary/vbe-glossary.md). The order of precision, from least to most precise, is [Byte](../../Glossary/vbe-glossary.md), [Integer](../../Glossary/vbe-glossary.md), [Long](../../Glossary/vbe-glossary.md), [Single](../../Glossary/vbe-glossary.md), [Currency](../../Glossary/vbe-glossary.md), [Double](../../Glossary/vbe-glossary.md), and [Decimal](../../Glossary/vbe-glossary.md). The following are exceptions to this order: diff --git a/Language/Reference/User-Interface-Help/option-base-statement.md b/Language/Reference/User-Interface-Help/option-base-statement.md index 5a4e4724ab2..7b4b9e6c3d2 100644 --- a/Language/Reference/User-Interface-Help/option-base-statement.md +++ b/Language/Reference/User-Interface-Help/option-base-statement.md @@ -13,11 +13,12 @@ ms.date: 06/08/2017 Used at [module level](../../Glossary/vbe-glossary.md) to declare the default lower bound for[array](../../Glossary/vbe-glossary.md) subscripts. - **Syntax** +## Syntax - **Option Base** { **0** |**1** } +**Option Base** { **0** |**1** } + +## Remarks - **Remarks** Because the default base is **0**, the **Option Base** statement is never required. If used, the[statement](../../Glossary/vbe-glossary.md) must appear in a[module](../../Glossary/vbe-glossary.md) before any[procedures](../../Glossary/vbe-glossary.md). **Option** **Base** can appear only once in a module and must precede array[declarations](../../Glossary/vbe-glossary.md) that include dimensions. **Note** The **To** clause in the **Dim**, **Private**, **Public**, **ReDim**, and **Static** statements provides a more flexible way to control the range of an array's subscripts. However, if you don't explicitly set the lower bound with a **To** clause, you can use **Option Base** to change the default lower bound to 1. The base of an array created with the the **ParamArray** keyword is zero; **Option Base** does not affect **ParamArray** (or the **Array** function, when qualified with the name of its type library, for example **VBA.Array**). diff --git a/Language/Reference/User-Interface-Help/option-compare-statement.md b/Language/Reference/User-Interface-Help/option-compare-statement.md index 8d0c6b10fbc..d26977799ff 100644 --- a/Language/Reference/User-Interface-Help/option-compare-statement.md +++ b/Language/Reference/User-Interface-Help/option-compare-statement.md @@ -13,11 +13,12 @@ ms.date: 06/08/2017 Used at [module level](../../Glossary/vbe-glossary.md) to declare the default comparison method to use when string data is compared. - **Syntax** +## Syntax - **Option Compare** { **Binary** |**Text** |**Database** } +**Option Compare** { **Binary** |**Text** |**Database** } + +## Remarks - **Remarks** If used, the **Option** **Compare** statement must appear in a[module](../../Glossary/vbe-glossary.md) before any[procedures](../../Glossary/vbe-glossary.md). The **Option Compare** statement specifies the[string comparison](../../Glossary/vbe-glossary.md) method (**Binary**, **Text**, or **Database**) for a module. If a module doesn't include an **Option** **Compare** statement, the default text comparison method is **Binary**. **Option Compare Binary** results in string comparisons based on a[sort order](../../Glossary/vbe-glossary.md) derived from the internal binary representations of the characters. In Microsoft Windows, sort order is determined by the code page. A typical binary sort order is shown in the following example: diff --git a/Language/Reference/User-Interface-Help/option-explicit-statement.md b/Language/Reference/User-Interface-Help/option-explicit-statement.md index 9f2cd008e0b..05132a8db6d 100644 --- a/Language/Reference/User-Interface-Help/option-explicit-statement.md +++ b/Language/Reference/User-Interface-Help/option-explicit-statement.md @@ -13,11 +13,12 @@ ms.date: 06/08/2017 Used at [module level](../../Glossary/vbe-glossary.md) to force explicit declaration of all[variables](../../Glossary/vbe-glossary.md) in that[module](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **Option Explicit** +**Option Explicit** + +## Remarks - **Remarks** If used, the **Option** **Explicit** statement must appear in a module before any[procedures](../../Glossary/vbe-glossary.md). When **Option Explicit** appears in a module, you must explicitly declare all variables using the **Dim**, **Private**, **Public**, **ReDim**, or **Static** statements. If you attempt to use an undeclared variable name, an error occurs at[compile time](../../Glossary/vbe-glossary.md). If you don't use the **Option Explicit** statement, all undeclared variables are of **Variant** type unless the default type is otherwise specified with a **Def**_type_ statement. diff --git a/Language/Reference/User-Interface-Help/option-private-statement.md b/Language/Reference/User-Interface-Help/option-private-statement.md index fc29056afde..7d7e1983859 100644 --- a/Language/Reference/User-Interface-Help/option-private-statement.md +++ b/Language/Reference/User-Interface-Help/option-private-statement.md @@ -13,11 +13,12 @@ ms.date: 06/08/2017 When used in host applications that allow references across multiple [projects](../../Glossary/vbe-glossary.md), **Option Private Module** prevents a[module's](../../Glossary/vbe-glossary.md) contents from being referenced outside its project. In host applications that don't permit such references, for example, standalone versions of Visual Basic, **Option Private** has no effect. - **Syntax** +## Syntax - **Option Private Module** +**Option Private Module** + +## Remarks - **Remarks** If used, the **Option** **Private** statement must appear at[module level](../../Glossary/vbe-glossary.md), before any [procedures](../../Glossary/vbe-glossary.md). When a module contains **Option Private Module**, the public parts, for example,[variables](../../Glossary/vbe-glossary.md), [objects](../../Glossary/vbe-glossary.md), and [user-defined types](../../Glossary/vbe-glossary.md) declared at module level, are still available within the[project](../../Glossary/vbe-glossary.md) containing the module, but they are not available to other applications or projects. diff --git a/Language/Reference/User-Interface-Help/optionbutton-control.md b/Language/Reference/User-Interface-Help/optionbutton-control.md index b7f76003442..7dc68b948ee 100644 --- a/Language/Reference/User-Interface-Help/optionbutton-control.md +++ b/Language/Reference/User-Interface-Help/optionbutton-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Shows the selection status of one item in a [group](../../../language/Glossary/glossary-vba.md) of choices. - **Remarks** + +## Remarks + Use an **OptionButton** to show whether a single item in a group is selected. Note that each **OptionButton** in a **Frame** is mutually exclusive. If an **OptionButton** is[bound](../../../language/Glossary/glossary-vba.md) to a[data source](../../../language/Glossary/glossary-vba.md), the **OptionButton** can show the value of that data source as either _Yes_ / _No_, _True_ / _False_, or _On_ / _Off_. If the user selects the **OptionButton**, the current setting is _Yes_, _True_, or _On_; if the user does not select the **OptionButton**, the setting is _No_, _False_, or _Off_. For example, an **OptionButton** in an inventory-tracking application might show whether an item is discontinued. If the **OptionButton** is bound to a data source, then changing the settings changes the value of that data source. A disabled **OptionButton** is dimmed and does not show a value. Depending on the value of the **TripleState** property, an **OptionButton** can also have a[null](../../Glossary/vbe-glossary.md) value. diff --git a/Language/Reference/User-Interface-Help/or-operator.md b/Language/Reference/User-Interface-Help/or-operator.md index d59a3d916fb..845b241e96f 100644 --- a/Language/Reference/User-Interface-Help/or-operator.md +++ b/Language/Reference/User-Interface-Help/or-operator.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to perform a logical disjunction on two [expressions](../../Glossary/vbe-glossary.md). - **Syntax** - _result_**=**_expression1_ **Or** _expression2_ + +## Syntax + +_result_**=**_expression1_ **Or** _expression2_ The **Or** operator syntax has these parts: @@ -25,7 +27,8 @@ The **Or** operator syntax has these parts: | _expression1_|Required; any expression.| | _expression2_|Required; any expression.| - **Remarks** +## Remarks + If either or both expressions evaluate to **True**, _result_ is **True**. The following table illustrates how _result_ is determined: diff --git a/Language/Reference/User-Interface-Help/orientation-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/orientation-property-microsoft-forms.md index ffcd5cde64c..e86d57ed530 100644 --- a/Language/Reference/User-Interface-Help/orientation-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/orientation-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Specifies whether the **SpinButton** or **ScrollBar** is oriented vertically or horizontally. - **Syntax** - _object_. **Orientation** [= _fmOrientation_ ] + +## Syntax + +_object_. **Orientation** [= _fmOrientation_ ] The **Orientation** property syntax has these parts: @@ -34,6 +36,7 @@ The settings for _fmOrientation_ are: | _FmOrientationVertical_|0|Control is rendered vertically.| | _FmOrientationHorizontal_|1|Control is rendered horizontally.| - **Remarks** +## Remarks + If you specify automatic orientation, the height and width of the control determine whether it appears horizontally or vertically. For example, if the control is wider than it is tall, it appears horizontally; if it is taller than it is wide, the control appears vertically. diff --git a/Language/Reference/User-Interface-Help/page-object.md b/Language/Reference/User-Interface-Help/page-object.md index 6f3f0d570af..75f44da4e72 100644 --- a/Language/Reference/User-Interface-Help/page-object.md +++ b/Language/Reference/User-Interface-Help/page-object.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 One page of a **MultiPage** and a single member of a **Pages** collection. - **Remarks** + +## Remarks + Each **Page** object contains its own set of controls and does not necessarily rely on other pages in the[collection](../../Glossary/vbe-glossary.md) for information. A **Page** inherits some properties from its[container](../../Glossary/vbe-glossary.md); the value of each [inherited property](../../../language/Glossary/glossary-vba.md) is set by the container. A **Page** has a unique name and index value within a **Pages** collection. You can reference a **Page** by either its name or its index value. The index of the first **Page** in a collection is 0; the index of the second **Page** is 1; and so on. When two **Page** objects have the same name, you must reference each **Page** by its index value. References to the name in code will access only the first **Page** that uses the name. The default name for the first **Page** is Page1; the default name for the second **Page** is Page2. diff --git a/Language/Reference/User-Interface-Help/pages-collection-microsoft-forms.md b/Language/Reference/User-Interface-Help/pages-collection-microsoft-forms.md index 0deacab422b..52689631b6d 100644 --- a/Language/Reference/User-Interface-Help/pages-collection-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/pages-collection-microsoft-forms.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 A **Pages** collection includes all the pages of a **MultiPage**. - **Remarks** + +## Remarks + Each **Pages** collection provides the features to manage the number of pages in the[collection](../../Glossary/vbe-glossary.md) and to identify the page that is currently in use. A **Page** object has a unique name and index value within a **Pages** collection. You can reference a **Page** either by its name or its index value. The index of the first **Page** in a collection is 0; the index of the second **Page** is 1; and so on. The default name for the first page is Page1; the default name for the second page is Page2. The default value of a **Pages** collection identifies the current **Page** of a collection. diff --git a/Language/Reference/User-Interface-Help/parent-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/parent-property-vba-add-in-object-model.md index 5fde594d8c4..e15dfd15a5f 100644 --- a/Language/Reference/User-Interface-Help/parent-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/parent-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns the object or [collection](../../Glossary/vbe-glossary.md) that contains another object or collection. Read-only. - **Remarks** + +## Remarks + Most objects have either a **Parent** property or a **Collection** property that points to the object's parent object in this object model. The **Collection** property is used if the parent object is a collection. Use the **Parent** property to access the[properties](../../Glossary/vbe-glossary.md), [methods](../../Glossary/vbe-glossary.md), and [controls](../../Glossary/vbe-glossary.md) of an object's parent object. diff --git a/Language/Reference/User-Interface-Help/parent-propertya-microsoft-forms.md b/Language/Reference/User-Interface-Help/parent-propertya-microsoft-forms.md index c6514ab12dd..3b428e5f277 100644 --- a/Language/Reference/User-Interface-Help/parent-propertya-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/parent-propertya-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns the name of the form, object, or [collection](../../Glossary/vbe-glossary.md) that contains a specific control, object, or collection. - **Syntax** - _object_. **Parent** + +## Syntax + +_object_. **Parent** The **Parent** property syntax has these parts: @@ -23,8 +25,9 @@ The **Parent** property syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** - **Parent** is read-only. +## Remarks + +**Parent** is read-only. Use the **Parent** property to access the properties, methods, or controls of an object's parent. This property is useful in an application in which you pass objects as arguments. For example, you could pass a control variable to a general procedure in a [module](../../Glossary/vbe-glossary.md), and use **Parent** to access its parent form. diff --git a/Language/Reference/User-Interface-Help/parentfolder-property.md b/Language/Reference/User-Interface-Help/parentfolder-property.md index 1ac5e149eab..8bbc79c1e7d 100644 --- a/Language/Reference/User-Interface-Help/parentfolder-property.md +++ b/Language/Reference/User-Interface-Help/parentfolder-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the folder object for the parent of the specified file or folder. Read-only. - **Syntax** - _object_. **ParentFolder** + +## Syntax + +_object_. **ParentFolder** The _object_ is always a **File** or **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **ParentFolder** property with a file: diff --git a/Language/Reference/User-Interface-Help/partition-function.md b/Language/Reference/User-Interface-Help/partition-function.md index b9a4d1a19ad..363a0cf07e5 100644 --- a/Language/Reference/User-Interface-Help/partition-function.md +++ b/Language/Reference/User-Interface-Help/partition-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) indicating where a number occurs within a calculated series of ranges. - **Syntax** - **Partition( _number_,** **_start_,** **_stop_,** **_interval_ )** + +## Syntax + +**Partition( _number_,** **_start_,** **_stop_,** **_interval_ )** The **Partition** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,7 +27,8 @@ The **Partition** function syntax has these[named arguments](../../Glossary/vbe |**_start_**|Required. Whole number that is the start of the overall range of numbers. The number can't be less than 0.| |**_stop_**|Required. Whole number that is the end of the overall range of numbers. The number can't be equal to or less than **_start_**.| - **Remarks** +## Remarks + The **Partition** function identifies the particular range in which **_number_** falls and returns a **Variant** (**String**) describing that range. The **Partition** function is most useful in queries. You can create a select query that shows how many orders fall within various ranges, for example, order values from 1 to 1000, 1001 to 2000, and so on. The following table shows how the ranges are determined using three sets of **_start_**, **_stop_**, and **_interval_** parts. The First Range and Last Range columns show what **Partition** returns. The ranges are represented by _lowervalue_: _uppervalue_, where the low end ( _lowervalue_ ) of the range is separated from the high end ( _uppervalue_ ) of the range with a colon (**:**). diff --git a/Language/Reference/User-Interface-Help/paste-method-microsoft-forms.md b/Language/Reference/User-Interface-Help/paste-method-microsoft-forms.md index 181361bad21..de8b4ea6a8d 100644 --- a/Language/Reference/User-Interface-Help/paste-method-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/paste-method-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Transfers the contents of the Clipboard to an object. - **Syntax** - _object_. **Paste** + +## Syntax + +_object_. **Paste** The **Paste** method syntax has these parts: @@ -23,7 +25,8 @@ The **Paste** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + Data pasted into a **ComboBox** or **TextBox** is treated as text. When the paste method is used with a form, you can paste any object onto the form. diff --git a/Language/Reference/User-Interface-Help/path-property-filesystemobject-object.md b/Language/Reference/User-Interface-Help/path-property-filesystemobject-object.md index be30d463d07..4d24955f9d3 100644 --- a/Language/Reference/User-Interface-Help/path-property-filesystemobject-object.md +++ b/Language/Reference/User-Interface-Help/path-property-filesystemobject-object.md @@ -15,10 +15,14 @@ ms.date: 06/08/2017 **Description** Returns the path for a specified file, folder, or drive. - **Syntax** - _object_. **Path** + +## Syntax + +_object_. **Path** The _object_ is always a **File**, **Folder**, or **Drive** object. - **Remarks** + +## Remarks + For drive letters, the root drive is not included. For example, the path for the C drive is C:, not C:\. The following code illustrates the use of the **Path** property with a **File** object: diff --git a/Language/Reference/User-Interface-Help/picture-property.md b/Language/Reference/User-Interface-Help/picture-property.md index 66eacc64871..51517febfc8 100644 --- a/Language/Reference/User-Interface-Help/picture-property.md +++ b/Language/Reference/User-Interface-Help/picture-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the bitmap to display on an object. - **Syntax** - _object_. **Picture** = **LoadPicture(**_pathname_**)** + +## Syntax + +_object_. **Picture** = **LoadPicture(**_pathname_**)** The **Picture** property syntax has these parts: @@ -26,7 +28,8 @@ The **Picture** property syntax has these parts: | _object_|Required. A valid object.| | _pathname_|Required. The full path to a picture file.| - **Remarks** +## Remarks + While designing a form, you can use the control's [property page](../../../language/Glossary/glossary-vba.md) to assign a bitmap to the **Picture** property. While running a form, you must use the **LoadPicture** function to assign a bitmap to **Picture**. To remove a picture that is assigned to a control, click the value of the **Picture** property in the property page and then press DELETE. Pressing BACKSPACE will not remove the picture. diff --git a/Language/Reference/User-Interface-Help/picturealignment-property.md b/Language/Reference/User-Interface-Help/picturealignment-property.md index 9ba36aedb23..217920de4c6 100644 --- a/Language/Reference/User-Interface-Help/picturealignment-property.md +++ b/Language/Reference/User-Interface-Help/picturealignment-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the location of a background picture. - **Syntax** - _object_. **PictureAlignment** [= _fmPictureAlignment_ ] + +## Syntax + +_object_. **PictureAlignment** [= _fmPictureAlignment_ ] The **PictureAlignment** property syntax has these parts: @@ -38,7 +40,8 @@ The settings for _fmPictureAlignment_ are: | _fmPictureAlignmentBottomLeft_|3|The bottom left corner.| | _fmPictureAlignmentBottomRight_|4|The bottom right corner.| - **Remarks** +## Remarks + The **PictureAlignment** property identifies which corner of the picture is the same as the corresponding corner of the control or[container](../../Glossary/vbe-glossary.md) where the picture is used. For example, setting **PictureAlignment** to **fmPictureAlignmentTopLeft** means that the top left corner of the picture coincides with the top left corner of the control or container. Setting **PictureAlignment** to **fmPictureAlignmentCenter** positions the picture in the middle, relative to the height as well as the width of the control or container. If you tile an image on a control or container, the setting of **PIctureAlignment** affects the tiling pattern. For example, if **PictureAlignment** is set to **fmPictureAlignmentUpperLeft**, the first copy of the image is laid in the upper left corner of the control or container and additional copies are tiled from left to right across each row. If **PictureAlignment** is **fmPictureAlignmentCenter**, the first copy of the image is laid at the center of the control or container, additional copies are laid to the left and right to complete the row, and additional rows are added to fill the control or container. diff --git a/Language/Reference/User-Interface-Help/pictureposition-property.md b/Language/Reference/User-Interface-Help/pictureposition-property.md index e22109fa4c6..eb8e25da45f 100644 --- a/Language/Reference/User-Interface-Help/pictureposition-property.md +++ b/Language/Reference/User-Interface-Help/pictureposition-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the location of the picture relative to its caption. - **Syntax** - _object_. **PicturePosition** [= _fmPicturePosition_ ] + +## Syntax + +_object_. **PicturePosition** [= _fmPicturePosition_ ] The **PicturePosition** property syntax has these parts: @@ -46,7 +48,8 @@ The settings for _fmPicturePosition_ are: | _fmPicturePositionBelowRight_|11|The picture appears below the caption. The caption is aligned with the right edge of the picture.| | _fmPicturePositionCenter_|12|The picture appears in the center of the control. The caption is centered horizontally and vertically on top of the picture.| - **Remarks** +## Remarks + The picture and the caption, as a unit, are centered on the control. If no caption exists, the picture's location is relative to the center of the control. This property is ignored if the **Picture** property does not specify a picture. diff --git a/Language/Reference/User-Interface-Help/picturesizemode-property.md b/Language/Reference/User-Interface-Help/picturesizemode-property.md index 8a00ad16ccf..e5338824042 100644 --- a/Language/Reference/User-Interface-Help/picturesizemode-property.md +++ b/Language/Reference/User-Interface-Help/picturesizemode-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies how to display the background picture on a control, form, or page. - **Syntax** - _object_. **PictureSizeMode** [= _fmPictureSizeMode_ ] + +## Syntax + +_object_. **PictureSizeMode** [= _fmPictureSizeMode_ ] The **PictureSizeMode** property syntax has these parts: @@ -36,7 +38,8 @@ The settings for _fmPictureSizeMode_ are: | _fmPictureSizeModeStretch_|1|Stretches the picture to fill the form or page. This setting distorts the picture in either the horizontal or vertical direction.| | _fmPictureSizeModeZoom_|3|Enlarges the picture, but does not distort the picture in either the horizontal or vertical direction.| - **Remarks** +## Remarks + The **fmPictureSizeModeClip** setting indicates you want to show the picture in its original size and scale. If the form or page is smaller than the picture, this setting only shows the part of the picture that fits within the form or page. The **fmPictureSizeModeStretch** and **fmPictureSizeModeZoom** settings both enlarge the image, but **fmPictureSizeModeStretch** causes distortion. The **fmPictureSizeModeStretch** setting enlarges the image horizontally and vertically until the image reaches the corresponding edges of the[container](../../Glossary/vbe-glossary.md) or control. The **fmPictureSizeModeZoom** setting enlarges the image until it reaches either the horizontal or vertical edges of the container or control. If the image reaches the horizontal edges first, any remaining distance to the vertical edges remains blank. If it reaches the vertical edges first, any remaining distance to the horizontal edges remains blank. diff --git a/Language/Reference/User-Interface-Help/picturetiling-property.md b/Language/Reference/User-Interface-Help/picturetiling-property.md index 2dca436c123..8f260c902d6 100644 --- a/Language/Reference/User-Interface-Help/picturetiling-property.md +++ b/Language/Reference/User-Interface-Help/picturetiling-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Lets you tile a picture in a form or page. - **Syntax** - _object_. **PictureTiling** [= _Boolean_ ] + +## Syntax + +_object_. **PictureTiling** [= _Boolean_ ] The **PictureTiling** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|The picture is tiled across the background.| |**False**|The picture is not tiled across the background (default).| - **Remarks** +## Remarks + If a picture is smaller than the form or page that contains it, you can tile the picture on the form or page. The tiling pattern depends on the current setting of the **PictureAlignment** and **PictureSizeMode** properties. For example, if **PictureAlignment** is set to **fmPictureAlignmentTopLeft**, the tiling pattern starts at the upper left and repeats the picture across the form or page and down the height of the form or page. If **PictureSizeMode** is set to **fmPictureSizeModeClip**, the tiling pattern crops the last tile if it doesn't completely fit on the form or page. diff --git a/Language/Reference/User-Interface-Help/plus-operator.md b/Language/Reference/User-Interface-Help/plus-operator.md index 9d602cf70f1..44c772fa968 100644 --- a/Language/Reference/User-Interface-Help/plus-operator.md +++ b/Language/Reference/User-Interface-Help/plus-operator.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Used to sum two numbers. - **Syntax** - _result_ **=** _expression1 + expression2_. + +## Syntax + +_result_ **=** _expression1 + expression2_. The **+** operator syntax has these parts: @@ -25,7 +27,8 @@ The **+** operator syntax has these parts: | _expression1_|Required; any [expression](../../Glossary/vbe-glossary.md).| | _expression2_|Required; any expression.| - **Remarks** +## Remarks + When you use the **+** operator, you may not be able to determine whether addition or string concatenation will occur. Use the **&;** operator for concatenation to eliminate ambiguity and provide self-documenting code. If at least one expression is not a [Variant](../../Glossary/vbe-glossary.md), the following rules apply: diff --git a/Language/Reference/User-Interface-Help/pmt-function.md b/Language/Reference/User-Interface-Help/pmt-function.md index 5c8ced00a12..e11f5d492d9 100644 --- a/Language/Reference/User-Interface-Help/pmt-function.md +++ b/Language/Reference/User-Interface-Help/pmt-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the payment for an annuity based on periodic, fixed payments and a fixed interest rate. - **Syntax** - **Pmt( _rate_**, **_nper_**, **_pv_** [, **_fv_** [, **_type_** ]] **)** + +## Syntax + +**Pmt( _rate_**, **_nper_**, **_pv_** [, **_fv_** [, **_type_** ]] **)** The **Pmt** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -27,7 +29,8 @@ The **Pmt** function has these[named arguments](../../Glossary/vbe-glossary.md) |**_fv_**|Optional. [Variant](../../Glossary/vbe-glossary.md) specifying future value or cash balance you want after you've made the final payment. For example, the future value of a loan is $0 because that's its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.| |**_type_**|Optional. **Variant** specifying when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.| - **Remarks** +## Remarks + An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan). The **_rate_** and **_nper_**[arguments](../../Glossary/vbe-glossary.md) must be calculated using payment periods expressed in the same units. For example, if **_rate_** is calculated using months, **_nper_** must also be calculated using months. For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers. diff --git a/Language/Reference/User-Interface-Help/ppmt-function.md b/Language/Reference/User-Interface-Help/ppmt-function.md index 9df2095275e..e5db0b97300 100644 --- a/Language/Reference/User-Interface-Help/ppmt-function.md +++ b/Language/Reference/User-Interface-Help/ppmt-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the principal payment for a given period of an annuity based on periodic, fixed payments and a fixed interest rate. - **Syntax** - **PPmt( _rate_**, **_per_**, **_nper_**, **_pv_** [, **_fv_** [, **_type_** ]] **)** + +## Syntax + +**PPmt( _rate_**, **_per_**, **_nper_**, **_pv_** [, **_fv_** [, **_type_** ]] **)** The **PPmt** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -28,7 +30,8 @@ The **PPmt** function has these[named arguments](../../Glossary/vbe-glossary.md |**_fv_**|Optional. [Variant](../../Glossary/vbe-glossary.md) specifying future value or cash balance you want after you've made the final payment. For example, the future value of a loan is $0 because that's its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.| |**_type_**|Optional. **Variant** specifying when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.| - **Remarks** +## Remarks + An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan). The **_rate_** and **_nper_**[arguments](../../Glossary/vbe-glossary.md) must be calculated using payment periods expressed in the same units. For example, if **_rate_** is calculated using months, **_nper_** must also be calculated using months. For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers. diff --git a/Language/Reference/User-Interface-Help/print-method.md b/Language/Reference/User-Interface-Help/print-method.md index 77b0601ef45..ab392c66301 100644 --- a/Language/Reference/User-Interface-Help/print-method.md +++ b/Language/Reference/User-Interface-Help/print-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Prints text in the **Immediate** window. - **Syntax** - _object_**.Print** [ _outputlist_ ] + +## Syntax + +_object_**.Print** [ _outputlist_ ] The **Print** method syntax has the following object qualifier and part: @@ -37,7 +39,8 @@ The _outputlist_[argument](../../Glossary/vbe-glossary.md) has the following sy | _expression_|Optional. [Numeric expression](../../Glossary/vbe-glossary.md) or[string expression](../../Glossary/vbe-glossary.md) to print.| | _charpos_|Optional. Specifies the insertion point for the next character. Use a semicolon (**;**) to position the insertion point immediately following the last character displayed. Use **Tab(**_n_**)** to position the insertion point at an absolute column number. Use **Tab** with no argument to position the insertion point at the beginning of the next print zone. If _charpos_ is omitted, the next character is printed on the next line.| - **Remarks** +## Remarks + Multiple expressions can be separated with either a space or a semicolon. All data printed to the **Immediate** window is properly formatted using the decimal separator for the[locale](../../Glossary/vbe-glossary.md) settings specified for your system. The[keywords](../../Glossary/vbe-glossary.md) are output in the appropriate language for the[host application](../../Glossary/vbe-glossary.md). For [Boolean](../../Glossary/vbe-glossary.md) data, either `True` or `False` is printed. The **True** and **False** keywords are translated according to the locale setting for the host application. diff --git a/Language/Reference/User-Interface-Help/printform-method.md b/Language/Reference/User-Interface-Help/printform-method.md index 2d001c8fcdb..15b5dad0ab0 100644 --- a/Language/Reference/User-Interface-Help/printform-method.md +++ b/Language/Reference/User-Interface-Help/printform-method.md @@ -16,11 +16,15 @@ ms.date: 06/08/2017 Sends a bit-by-bit image of a **UserForm** object to the printer. - **Syntax** - _object_**.PrintForm** + +## Syntax + +_object_**.PrintForm** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. If _object_ is omitted, the **UserForm** with the[focus](../../Glossary/vbe-glossary.md) is assumed to be _object_. - **Remarks** - **PrintForm** prints all visible objects and[bitmaps](../../Glossary/vbe-glossary.md) of the **UserForm** object. **PrintForm** also prints graphics added to a **UserForm** object. + +## Remarks + +**PrintForm** prints all visible objects and[bitmaps](../../Glossary/vbe-glossary.md) of the **UserForm** object. **PrintForm** also prints graphics added to a **UserForm** object. The printer used by **PrintForm** is determined by the operating system's **Control Panel** settings. ## Example diff --git a/Language/Reference/User-Interface-Help/printstatement.md b/Language/Reference/User-Interface-Help/printstatement.md index 8328dd3fbb7..14d53df9115 100644 --- a/Language/Reference/User-Interface-Help/printstatement.md +++ b/Language/Reference/User-Interface-Help/printstatement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Writes display-formatted data to a sequential file. - **Syntax** +## Syntax - **Print** **#**_filenumber_, [ _outputlist_ ] +**Print** **#**_filenumber_, [ _outputlist_ ] The **Print #** statement syntax has these parts: @@ -37,7 +37,8 @@ The _outputlist_[argument](../../Glossary/vbe-glossary.md) settings are: | _expression_|[Numeric expressions](../../Glossary/vbe-glossary.md) or[string expressions](../../Glossary/vbe-glossary.md) to print.| | _charpos_|Specifies the insertion point for the next character. Use a semicolon to position the insertion point immediately after the last character displayed. Use **Tab(**_n_**)** to position the insertion point to an absolute column number. Use **Tab** with no argument to position the insertion point at the beginning of the next print zone. If _charpos_ is omitted, the next character is printed on the next line.| - **Remarks** +## Remarks + Data written with **Print #** is usually read from a file with **Line Input #** or **Input**. If you omit _outputlist_ and include only a list separator after _filenumber_, a blank line is printed to the file. Multiple expressions can be separated with either a space or a semicolon. A space has the same effect as a semicolon. For [Boolean](../../Glossary/vbe-glossary.md) data, either `True` or or `False` is printed. The **True** and **False** keywords are not translated, regardless of the[locale](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/private-statement.md b/Language/Reference/User-Interface-Help/private-statement.md index 9018ca09537..36fdddbd9b0 100644 --- a/Language/Reference/User-Interface-Help/private-statement.md +++ b/Language/Reference/User-Interface-Help/private-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Used at [module level](../../Glossary/vbe-glossary.md) to declare private[variables](../../Glossary/vbe-glossary.md) and allocate storage space. - **Syntax** +## Syntax - **Private** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ] [ **,** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ]] **. . .** +**Private** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ] [ **,** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ]] **. . .** The **Private** statement syntax has these parts: @@ -32,8 +32,9 @@ The **Private** statement syntax has these parts: |**New**|Optional. Keyword that enables implicit creation of an object. If you use **New** when declaring the object variable, a new instance of the object is created on first reference to it, so you don't have to use the **Set** statement to assign the object reference. The **New** keyword can't be used to declare variables of any intrinsic[data type](../../Glossary/vbe-glossary.md), can't be used to declare instances of dependent objects, and can't be used with **WithEvents**.| | _type_|Optional. Data type of the variable; may be [Byte](../../Glossary/vbe-glossary.md), [Boolean](../../Glossary/vbe-glossary.md), [Integer](../../Glossary/vbe-glossary.md), [Long](../../Glossary/vbe-glossary.md), [Currency](../../Glossary/vbe-glossary.md), [Single](../../Glossary/vbe-glossary.md), [Double](../../Glossary/vbe-glossary.md), [Decimal](../../Glossary/vbe-glossary.md) (not currently supported),[Date](../../Glossary/vbe-glossary.md), [String](../../Glossary/vbe-glossary.md) (for variable-length strings), **String** * _length_ (for fixed-length strings),[Object](../../Glossary/vbe-glossary.md), [Variant](../../Glossary/vbe-glossary.md), a [user-defined type](../../Glossary/vbe-glossary.md), or an [object type](../../Glossary/vbe-glossary.md). Use a separate **As**_type_ clause for each variable being defined.| - **Remarks** - **Private** variables are available only to the module in which they are declared. +## Remarks + +**Private** variables are available only to the module in which they are declared. Use the **Private** statement to declare the data type of a variable. For example, the following statement declares a variable as an **Integer**: diff --git a/Language/Reference/User-Interface-Help/procbodyline-property.md b/Language/Reference/User-Interface-Help/procbodyline-property.md index 48eea97e394..51fd9a0d7c9 100644 --- a/Language/Reference/User-Interface-Help/procbodyline-property.md +++ b/Language/Reference/User-Interface-Help/procbodyline-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns the first line of a [procedure](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.ProcBodyLine(**_procname_, _prockind_**) As Long** + +## Syntax + +_object_**.ProcBodyLine(**_procname_, _prockind_**) As Long** The **ProcBodyLine** syntax has these parts: @@ -37,6 +39,7 @@ You can use one of the following [constants](../../Glossary/vbe-glossary.md) for |**vbext_pk_Set**|Specifies a procedure that sets a reference to an object.| |**vbext_pk_Proc**|Specifies all procedures other than property procedures.| - **Remarks** +## Remarks + The first line of a procedure is the line on which the **Sub**, **Function**, or **Property** statement appears. diff --git a/Language/Reference/User-Interface-Help/proccountlines-property.md b/Language/Reference/User-Interface-Help/proccountlines-property.md index ec6bb409bb5..a320da8dffd 100644 --- a/Language/Reference/User-Interface-Help/proccountlines-property.md +++ b/Language/Reference/User-Interface-Help/proccountlines-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns the number of lines in the specified [procedure](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.ProcCountLines(**_procname_, _prockind_**) As Long** + +## Syntax + +_object_**.ProcCountLines(**_procname_, _prockind_**) As Long** The **ProcCountLines** syntax has these parts: @@ -37,6 +39,7 @@ You can use one of the following [constants](../../Glossary/vbe-glossary.md) for |**vbext_pk_Set**|Specifies a procedure that sets a reference to an object.| |**vbext_pk_Proc**|Specifies all procedures other than property procedures.| - **Remarks** +## Remarks + The **ProcCountLines** property returns the count of all blank or comment lines preceding the procedure declaration and, if the procedure is the last procedure in a[code module](../../Glossary/vbe-glossary.md), any blank lines following the procedure. diff --git a/Language/Reference/User-Interface-Help/procofline-property.md b/Language/Reference/User-Interface-Help/procofline-property.md index 02bceeeaeed..61cc3d6f75d 100644 --- a/Language/Reference/User-Interface-Help/procofline-property.md +++ b/Language/Reference/User-Interface-Help/procofline-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns the name of the [procedure](../../Glossary/vbe-glossary.md) that the specified line is in. - **Syntax** - _object_**.ProcOfLine(**_line_, _prockind_**) As String** + +## Syntax + +_object_**.ProcOfLine(**_line_, _prockind_**) As String** The **ProcOfLine** syntax has these parts: @@ -37,6 +39,7 @@ You can use one of the following [constants](../../Glossary/vbe-glossary.md) for |**vbext_pk_Set**|Specifies a procedure that sets a reference to an object.| |**vbext_pk_Proc**|Specifies all procedures other than property procedures.| - **Remarks** +## Remarks + A line is within a procedure if it's a blank line or comment line preceding the procedure declaration and, if the procedure is the last procedure in a [code module](../../Glossary/vbe-glossary.md), a blank line or lines following the procedure. diff --git a/Language/Reference/User-Interface-Help/procstartline-property.md b/Language/Reference/User-Interface-Help/procstartline-property.md index 4e57959866a..6b708a474ef 100644 --- a/Language/Reference/User-Interface-Help/procstartline-property.md +++ b/Language/Reference/User-Interface-Help/procstartline-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns the line at which the specified [procedure](../../Glossary/vbe-glossary.md) begins. - **Syntax** - _object_**.ProcStartLine(**_procname_, _prockind_**) As Long** + +## Syntax + +_object_**.ProcStartLine(**_procname_, _prockind_**) As Long** The **ProcStartLine** syntax has these parts: @@ -37,6 +39,7 @@ You can use one of the following [constants](../../Glossary/vbe-glossary.md) for |**vbext_pk_Set**|Specifies a procedure that sets a reference to an object.| |**vbext_pk_Proc**|Specifies all procedures other than property procedures.| - **Remarks** +## Remarks + A procedure starts at the first line below the **End Sub** statement of the preceding procedure. If the procedure is the first procedure, it starts at the end of the general Declarations section. diff --git a/Language/Reference/User-Interface-Help/progid-property.md b/Language/Reference/User-Interface-Help/progid-property.md index eb32149130f..4f0c1ed6b9d 100644 --- a/Language/Reference/User-Interface-Help/progid-property.md +++ b/Language/Reference/User-Interface-Help/progid-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Returns the ProgID (programmatic ID) for the control represented by the **VBControl** object. - **Syntax** - _object_**.ProgID** + +## Syntax + +_object_**.ProgID** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. diff --git a/Language/Reference/User-Interface-Help/properties-collection-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/properties-collection-vba-add-in-object-model.md index fbc8f31184b..73d9f92a0a6 100644 --- a/Language/Reference/User-Interface-Help/properties-collection-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/properties-collection-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Represents the [properties](../../Glossary/vbe-glossary.md) of an object. - **Remarks** + +## Remarks + Use the **Properties** collection to access the properties displayed in the[Properties window](../../Glossary/vbe-glossary.md). For every property listed in the **Properties** window, there is an object in the **Properties** collection. diff --git a/Language/Reference/User-Interface-Help/properties-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/properties-property-vba-add-in-object-model.md index fbb99f9a7be..2838f10f7e4 100644 --- a/Language/Reference/User-Interface-Help/properties-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/properties-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns the properties of an object. Read-only. - **Remarks** + +## Remarks + The **Properties** property is an accessor property (that is, a property that returns an object of the same type as the property name). diff --git a/Language/Reference/User-Interface-Help/property-get-statement.md b/Language/Reference/User-Interface-Help/property-get-statement.md index 7446869630e..521b62ac82c 100644 --- a/Language/Reference/User-Interface-Help/property-get-statement.md +++ b/Language/Reference/User-Interface-Help/property-get-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Declares the name, [arguments](../../Glossary/vbe-glossary.md), and code that form the body of a **Property**[procedure](../../Glossary/vbe-glossary.md), which gets the value of a [property](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax [ **Public** |**Private** |**Friend** ] [ **Static** ] **Property** **Get**_name_ [ **(**_arglist_**)** ] [ **As**_type_ ] [ _statements_ ] @@ -52,7 +52,8 @@ The _arglist_ argument has the following syntax and parts: | _type_|Optional. Data type of the argument passed to the procedure; may be **Byte**, **Boolean**, **Integer**, **Long**, **Currency**, **Single**, **Double**, **Decimal** (not currently supported), **Date**, **String** (variable length only), **Object**, **Variant**, or a specific[object type](../../Glossary/vbe-glossary.md). If the parameter is not **Optional**, a user-defined type may also be specified.| | _defaultvalue_|Optional. Any [constant](../../Glossary/vbe-glossary.md) or constant expression. Valid for **Optional** parameters only. If the type is an **Object**, an explicit default value can only be **Nothing**.| - **Remarks** +## Remarks + If not explicitly specified using **Public**, **Private**, or **Friend**, **Property** procedures are public by default. If **Static** is not used, the value of local variables is not preserved between calls. The **Friend** keyword can only be used in class modules. However, **Friend** procedures can be accessed by procedures in any module of a project. A **Friend** procedure doesn't appear in the[type library](../../Glossary/vbe-glossary.md) of its parent class, nor can a **Friend** procedure be late bound. All executable code must be in procedures. You can't define a **Property** **Get** procedure inside another **Property**, **Sub**, or **Function** procedure. The **Exit Property** statement causes an immediate exit from a **Property Get** procedure. Program execution continues with the statement following the statement that called the **Property** **Get** procedure. Any number of **Exit Property** statements can appear anywhere in a **Property** **Get** procedure. diff --git a/Language/Reference/User-Interface-Help/property-let-statement.md b/Language/Reference/User-Interface-Help/property-let-statement.md index 1d47ebb64e6..8e827f4242f 100644 --- a/Language/Reference/User-Interface-Help/property-let-statement.md +++ b/Language/Reference/User-Interface-Help/property-let-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Declares the name, [arguments](../../Glossary/vbe-glossary.md), and code that form the body of a **Property** **Let**[procedure](../../Glossary/vbe-glossary.md), which assigns a value to a [property](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax [ **Public** |**Private** |**Friend** ] [ **Static** ] **Property** **Let**_name_**(** [ _arglist_**,** ] _value_**)** [ _statements_ ] @@ -51,7 +51,8 @@ The _arglist_ argument has the following syntax and parts: **Note** Every **Property Let** statement must define at least one argument for the procedure it defines. That argument (or the last argument if there is more than one) contains the actual value to be assigned to the property when the procedure defined by the **Property Let** statement is invoked. That argument is referred to as _value_ in the preceding syntax. - **Remarks** +## Remarks + If not explicitly specified using **Public**, **Private**, or **Friend**, **Property** procedures are public by default. If **Static** isn't used, the value of local variables is not preserved between calls. The **Friend** keyword can only be used in class modules. However, **Friend** procedures can be accessed by procedures in any module of a project. A **Friend** procedure doesn't appear in the[type library](../../Glossary/vbe-glossary.md) of its parent class, nor can a **Friend** procedure be late bound. All executable code must be in procedures. You can't define a **Property Let** procedure inside another **Property**, **Sub**, or **Function** procedure. The **Exit Property** statement causes an immediate exit from a **Property Let** procedure. Program execution continues with the statement following the statement that called the **Property Let** procedure. Any number of **Exit Property** statements can appear anywhere in a **Property Let** procedure. diff --git a/Language/Reference/User-Interface-Help/property-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/property-object-vba-add-in-object-model.md index 3cde389bdca..bc1953ec874 100644 --- a/Language/Reference/User-Interface-Help/property-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/property-object-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Represents the [properties](../../Glossary/vbe-glossary.md) of an object that are visible in the[Properties window](../../Glossary/vbe-glossary.md) for any given component. - **Remarks** + +## Remarks + Use **Value** property of the **Property** object to return or set the value of a property of a component. At a minimum, all components have a **Name** property. Use the **Value** property of the **Property** object to return or set the value of a property. The **Value** property returns a[Variant](../../Glossary/vbe-glossary.md) of the appropriate type. If the value returned is an object, the **Value** property returns the **Properties** collection that contains **Property** objects representing the individual properties of the object. You can access each of the **Property** objects by using the **Item** method on the returned **Properties** collection. If the value returned by the **Property** object is an object, you can use the **Object** property to set the **Property** object to a new object. diff --git a/Language/Reference/User-Interface-Help/property-set-statement.md b/Language/Reference/User-Interface-Help/property-set-statement.md index d3be3d0b04c..22e1f91a240 100644 --- a/Language/Reference/User-Interface-Help/property-set-statement.md +++ b/Language/Reference/User-Interface-Help/property-set-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Declares the name, [arguments](../../Glossary/vbe-glossary.md), and code that form the body of a **Property**[procedure](../../Glossary/vbe-glossary.md), which sets a reference to an [object](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax [ **Public** |**Private** |**Friend** ] [ **Static** ] **Property** **Set**_name_**(** [ _arglist_**,** ] _reference_**)** [ _statements_ ] @@ -52,7 +52,8 @@ The _arglist_ argument has the following syntax and parts: **Note** Every **Property Set** statement must define at least one argument for the procedure it defines. That argument (or the last argument if there is more than one) contains the actual object reference for the property when the procedure defined by the **Property Set** statement is invoked. It is referred to as _reference_ in the preceding syntax. It can't be **Optional**. - **Remarks** +## Remarks + If not explicitly specified using **Public**, **Private**, or **Friend**, **Property** procedures are public by default. If **Static** isn't used, the value of local variables is not preserved between calls. The **Friend** keyword can only be used in class modules. However, **Friend** procedures can be accessed by procedures in any module of a project. A **Friend** procedure doesn't appear in the[type library](../../Glossary/vbe-glossary.md) of its parent class, nor can a **Friend** procedure be late bound. All executable code must be in procedures. You can't define a **Property** **Set** procedure inside another **Property**, **Sub**, or **Function** procedure. The **Exit Property** statement causes an immediate exit from a **Property** **Set** procedure. Program execution continues with the statement following the statement that called the **Property** **Set** procedure. Any number of **Exit Property** statements can appear anywhere in a **Property** **Set** procedure. diff --git a/Language/Reference/User-Interface-Help/proportionalthumb-property.md b/Language/Reference/User-Interface-Help/proportionalthumb-property.md index 4aab159ff09..0605200e394 100644 --- a/Language/Reference/User-Interface-Help/proportionalthumb-property.md +++ b/Language/Reference/User-Interface-Help/proportionalthumb-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether the size of the scroll box is proportional to the scrolling region or fixed. - **Syntax** - _object_. **ProportionalThumb** [= _Boolean_ ] + +## Syntax + +_object_. **ProportionalThumb** [= _Boolean_ ] The **ProportionalThumb** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|The scroll box is proportional in size to the scrolling region (default).| |**False**|The scroll box is a fixed size.| - **Remarks** +## Remarks + The size of a proportional scroll box graphically represents the percentage of the object that is visible in the window. For example, if 75 percent of an object is visible, the scroll box covers three-fourths of the scrolling region in the scroll bar. If the scroll box is a fixed size, the system determines its size based on the height and width of the scroll bar. diff --git a/Language/Reference/User-Interface-Help/public-statement.md b/Language/Reference/User-Interface-Help/public-statement.md index b47cfd1ef5e..ad99a86304d 100644 --- a/Language/Reference/User-Interface-Help/public-statement.md +++ b/Language/Reference/User-Interface-Help/public-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Used at [module level](../../Glossary/vbe-glossary.md) to declare public [variables](../../Glossary/vbe-glossary.md) and allocate storage space. - **Syntax** +## Syntax - **Public** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ] [ **,** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ]] **. . .** +**Public** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ] [ **,** [ **WithEvents** ] _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ]] **. . .** The **Public** statement syntax has these parts: @@ -28,7 +28,8 @@ The **Public** statement syntax has these parts: |**New**|Optional. Keyword that enables implicit creation of an object. If you use **New** when declaring the object variable, a new instance of the object is created on first reference to it, so you don't have to use the **Set** statement to assign the object reference. The **New** keyword can't be used to declare variables of any intrinsic[data type](../../Glossary/vbe-glossary.md), can't be used to declare instances of dependent objects, and can't be used with **WithEvents**.| | _type_|Optional. Data type of the variable; may be [Byte](../../Glossary/vbe-glossary.md), [Boolean](../../Glossary/vbe-glossary.md), [Integer](../../Glossary/vbe-glossary.md), [Long](../../Glossary/vbe-glossary.md), [Currency](../../Glossary/vbe-glossary.md), [Single](../../Glossary/vbe-glossary.md), [Double](../../Glossary/vbe-glossary.md), [Decimal](../../Glossary/vbe-glossary.md) (not currently supported), [Date](../../Glossary/vbe-glossary.md), [String](../../Glossary/vbe-glossary.md), (for variable-length strings), **String** * _length_ (for fixed-length strings), [Object](../../Glossary/vbe-glossary.md), [Variant](../../Glossary/vbe-glossary.md), a [user-defined type](../../Glossary/vbe-glossary.md), or an [object type](../../Glossary/vbe-glossary.md). Use a separate **As**_type_ clause for each variable being defined.| - **Remarks** +## Remarks + Variables declared using the **Public** statement are available to all procedures in all modules in all applications unless **Option** **Private Module** is in effect; in which case, the variables are public only within the [project](../../Glossary/vbe-glossary.md) in which they reside. The **Public** statement can't be used in a class module to declare a fixed-length string variable. Use the **Public** statement to declare the data type of a variable. For example, the following statement declares a variable as an **Integer**: diff --git a/Language/Reference/User-Interface-Help/put-statement.md b/Language/Reference/User-Interface-Help/put-statement.md index e9168971021..0bf421ec449 100644 --- a/Language/Reference/User-Interface-Help/put-statement.md +++ b/Language/Reference/User-Interface-Help/put-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Writes data from a [variable](../../Glossary/vbe-glossary.md) to a disk file. - **Syntax** +## Syntax - **Put** [ **#** ] _filenumber_, [ _recnumber_ ], _varname_ +**Put** [ **#** ] _filenumber_, [ _recnumber_ ], _varname_ The **Put** statement syntax has these parts: @@ -26,7 +26,8 @@ The **Put** statement syntax has these parts: | _recnumber_|Optional. **Variant** (**Long**). Record number (**Random** mode files) or byte number (**Binary** mode files) at which writing begins.| | _varname_|Required. Name of variable containing data to be written to disk.| - **Remarks** +## Remarks + Data written with **Put** is usually read from a file with **Get**. The first record or byte in a file is at position 1, the second record or byte is at position 2, and so on. If you omit _recnumber_, the next record or byte after the last **Get** or **Put** statement or pointed to by the last **Seek** function is written. You must include delimiting commas, for example: diff --git a/Language/Reference/User-Interface-Help/putinclipboard-method.md b/Language/Reference/User-Interface-Help/putinclipboard-method.md index af77b30ad3b..34454305f97 100644 --- a/Language/Reference/User-Interface-Help/putinclipboard-method.md +++ b/Language/Reference/User-Interface-Help/putinclipboard-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Moves data from a **DataObject** to the Clipboard. - **Syntax** - _object_. **PutInClipboard** + +## Syntax + +_object_. **PutInClipboard** The **PutInClipboard** method syntax has these parts: @@ -25,6 +27,7 @@ The **PutInClipboard** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The **PutInClipboard** method replaces the contents of the Clipboard with the contents of the **DataObject** that is in Text format. diff --git a/Language/Reference/User-Interface-Help/pv-function.md b/Language/Reference/User-Interface-Help/pv-function.md index a74135c74a3..c1dc8b5d429 100644 --- a/Language/Reference/User-Interface-Help/pv-function.md +++ b/Language/Reference/User-Interface-Help/pv-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the present value of an annuity based on periodic, fixed payments to be paid in the future and a fixed interest rate. - **Syntax** - **PV( _rate_**, **_nper_**, **_pmt_** [, **_fv_** [, **_type_** ]] **)** + +## Syntax + +**PV( _rate_**, **_nper_**, **_pmt_** [, **_fv_** [, **_type_** ]] **)** The **PV** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -27,7 +29,8 @@ The **PV** function has these[named arguments](../../Glossary/vbe-glossary.md): |**_fv_**|Optional. [Variant](../../Glossary/vbe-glossary.md) specifying future value or cash balance you want after you've made the final payment. For example, the future value of a loan is $0 because that's its value after the final payment. However, if you want to save $50,000 over 18 years for your child's education, then $50,000 is the future value. If omitted, 0 is assumed.| |**_type_**|Optional. **Variant** specifying when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.| - **Remarks** +## Remarks + An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan). The **_rate_** and **_nper_**[arguments](../../Glossary/vbe-glossary.md) must be calculated using payment periods expressed in the same units. For example, if **_rate_** is calculated using months, **_nper_** must also be calculated using months. For all arguments, cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers. diff --git a/Language/Reference/User-Interface-Help/qbcolor-function.md b/Language/Reference/User-Interface-Help/qbcolor-function.md index 4db84b53d1e..4ce706db11d 100644 --- a/Language/Reference/User-Interface-Help/qbcolor-function.md +++ b/Language/Reference/User-Interface-Help/qbcolor-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) representing the RGB color code corresponding to the specified color number. - **Syntax** - **QBColor(**_color_**)** + +## Syntax + +**QBColor(**_color_**)** The required _color_[argument](../../Glossary/vbe-glossary.md) is a whole number in the range 0-15. **Settings** The _color_ argument has these settings: @@ -32,7 +34,8 @@ The _color_ argument has these settings: |6|Yellow|14|Light Yellow| |7|White|15|Bright White| - **Remarks** +## Remarks + The _color_ argument represents color values used by earlier versions of Basic (such as Microsoft Visual Basic for MS-DOS and the Basic Compiler). Starting with the least-significant byte, the returned value specifies the red, green, and blue values used to set the appropriate color in the RGB system used by Visual Basic for Applications. ## Example diff --git a/Language/Reference/User-Interface-Help/queryclose-event.md b/Language/Reference/User-Interface-Help/queryclose-event.md index 6625c2aead3..79aea0df3f6 100644 --- a/Language/Reference/User-Interface-Help/queryclose-event.md +++ b/Language/Reference/User-Interface-Help/queryclose-event.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Occurs before a **UserForm** closes. - **Syntax** - **Private Sub UserForm_QueryClose(**_cancel_**As Integer**, _closemode_**As Integer)** + +## Syntax + +**Private Sub UserForm_QueryClose(**_cancel_**As Integer**, _closemode_**As Integer)** The **QueryClose** event syntax has these parts: @@ -38,7 +40,9 @@ The _closemode_ argument returns the following values: |**vbAppTaskManager**|3|The Windows **Task Manager** is closing the application.| These constants are listed in the Visual Basic for Applications [object library](../../Glossary/vbe-glossary.md) in the[Object Browser](../../Glossary/vbe-glossary.md). Note that **vbFormMDIForm** is also specified in the **Object Browser**, but is not yet supported. - **Remarks** + +## Remarks + This event is typically used to make sure there are no unfinished tasks in the user forms included in an application before that application closes. For example, if a user hasn't saved new data in any **UserForm**, the application can prompt the user to save the data. When an application closes, you can use the **QueryClose** event procedure to set the **Cancel** property to **True**, stopping the closing process. diff --git a/Language/Reference/User-Interface-Help/raise-method.md b/Language/Reference/User-Interface-Help/raise-method.md index 086268160db..6bda5e18da3 100644 --- a/Language/Reference/User-Interface-Help/raise-method.md +++ b/Language/Reference/User-Interface-Help/raise-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Generates a [run-time error](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.Raise _number_,** **_source_, _description_, _helpfile_, _helpcontext_** + +## Syntax + +_object_**.Raise _number_,** **_source_, _description_, _helpfile_, _helpcontext_** The **Raise** method has the following object qualifier and[named arguments](../../Glossary/vbe-glossary.md): @@ -30,7 +32,8 @@ The **Raise** method has the following object qualifier and[named arguments](.. |**_helpfile_**|Optional. The fully qualified path to the Help file in which help on this error can be found. If unspecified, Visual Basic uses the fully qualified drive, path, and file name of the Visual Basic Help file.| |**_helpcontext_**|Optional. The context ID identifying a topic within **_helpfile_** that provides help for the error. If omitted, the Visual Basic Help file context ID for the error corresponding to the **Number** property is used, if it exists.| - **Remarks** +## Remarks + All of the [arguments](../../Glossary/vbe-glossary.md) are optional except **_number_**. If you use **Raise** without specifying some arguments, and the property settings of the **Err** object contain values that have not been cleared, those values serve as the values for your error. **Raise** is used for generating run-time errors and can be used instead of the **Error** statement. **Raise** is useful for generating errors when writing class modules, because the **Err** object gives richer information than is possible if you generate errors with the **Error** statement. For example, with the **Raise** method, the source that generated the error can be specified in the **Source** property, online Help for the error can be referenced, and so on. diff --git a/Language/Reference/User-Interface-Help/raiseevent-statement.md b/Language/Reference/User-Interface-Help/raiseevent-statement.md index ab3731e0d67..d2ed283c29e 100644 --- a/Language/Reference/User-Interface-Help/raiseevent-statement.md +++ b/Language/Reference/User-Interface-Help/raiseevent-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Fires an event declared at [module level](../../Glossary/vbe-glossary.md) within a[class](../../Glossary/vbe-glossary.md), form, or document. - **Syntax** +## Syntax - **RaiseEvent**_eventname_ [ **(**_argumentlis_ t **)** ] +**RaiseEvent**_eventname_ [ **(**_argumentlis_ t **)** ] The required _eventname_ is the name of an event declared within the[module](../../Glossary/vbe-glossary.md) and follows Basic variable naming conventions. The **RaiseEvent** statement syntax has these parts: @@ -26,7 +26,8 @@ The **RaiseEvent** statement syntax has these parts: | _eventname_|Required. Name of the event to fire.| | _argumentlist_|Optional. Comma-delimited list of [variables](../../Glossary/vbe-glossary.md), [arrays](../../Glossary/vbe-glossary.md), or [expressions](../../Glossary/vbe-glossary.md) The _argumentlist_ must be enclosed by parentheses. If there are no[arguments](../../Glossary/vbe-glossary.md), the parentheses must be omitted.| - **Remarks** +## Remarks + If the event has not been declared within the module in which it is raised, an error occurs. The following fragment illustrates an event declaration and a procedure in which the event is raised. diff --git a/Language/Reference/User-Interface-Help/randomize-statement.md b/Language/Reference/User-Interface-Help/randomize-statement.md index 850798ec4de..0c7f37990d2 100644 --- a/Language/Reference/User-Interface-Help/randomize-statement.md +++ b/Language/Reference/User-Interface-Help/randomize-statement.md @@ -13,13 +13,15 @@ ms.date: 06/08/2017 Initializes the random-number generator. - **Syntax** +## Syntax - **Randomize** [ _number_ ] +**Randomize** [ _number_ ] The optional _number_[argument](../../Glossary/vbe-glossary.md) is a[Variant](../../Glossary/vbe-glossary.md) or any valid[numeric expression](../../Glossary/vbe-glossary.md). - **Remarks** - **Randomize** uses _number_ to initialize the **Rnd** function's random-number generator, giving it a new[seed](../../Glossary/vbe-glossary.md) value. If you omit _number,_ the value returned by the system timer is used as the new seed value. + +## Remarks + +**Randomize** uses _number_ to initialize the **Rnd** function's random-number generator, giving it a new[seed](../../Glossary/vbe-glossary.md) value. If you omit _number,_ the value returned by the system timer is used as the new seed value. If **Randomize** is not used, the **Rnd** function (with no arguments) uses the same number as a seed the first time it is called, and thereafter uses the last generated number as a seed value. **Note** To repeat sequences of random numbers, call **Rnd** with a negative argument immediately before using **Randomize** with a numeric argument. Using **Randomize** with the same value for _number_ does not repeat the previous sequence. diff --git a/Language/Reference/User-Interface-Help/rate-function.md b/Language/Reference/User-Interface-Help/rate-function.md index c1c11ada614..16ea7a3418e 100644 --- a/Language/Reference/User-Interface-Help/rate-function.md +++ b/Language/Reference/User-Interface-Help/rate-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the interest rate per period for an annuity. - **Syntax** - **Rate( _nper_**, **_pmt_**, **_pv_** [, **_fv_** [, **_type_** [, **_guess_** ]]] **)** + +## Syntax + +**Rate( _nper_**, **_pmt_**, **_pv_** [, **_fv_** [, **_type_** [, **_guess_** ]]] **)** The **Rate** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -28,7 +30,8 @@ The **Rate** function has these[named arguments](../../Glossary/vbe-glossary.md |**_type_**|Optional. **Variant** specifying a number indicating when payments are due. Use 0 if payments are due at the end of the payment period, or use 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.| |**_guess_**|Optional. **Variant** specifying value you estimate will be returned by **Rate**. If omitted, **_guess_** is 0.1 (10 percent).| - **Remarks** +## Remarks + An annuity is a series of fixed cash payments made over a period of time. An annuity can be a loan (such as a home mortgage) or an investment (such as a monthly savings plan). For all [arguments](../../Glossary/vbe-glossary.md), cash paid out (such as deposits to savings) is represented by negative numbers; cash received (such as dividend checks) is represented by positive numbers. **Rate** is calculated by iteration. Starting with the value of **_guess_**, **Rate** cycles through the calculation until the result is accurate to within 0.00001 percent. If **Rate** can't find a result after 20 tries, it fails. If your guess is 10 percent and **Rate** fails, try a different value for **_guess_**. diff --git a/Language/Reference/User-Interface-Help/read-method.md b/Language/Reference/User-Interface-Help/read-method.md index 2a86f201b94..d282e0432a0 100644 --- a/Language/Reference/User-Interface-Help/read-method.md +++ b/Language/Reference/User-Interface-Help/read-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Reads a specified number of characters from a **TextStream** file and returns the resulting string. - **Syntax** - _object_. **Read(**_characters_**)** + +## Syntax + +_object_. **Read(**_characters_**)** The **Read** method syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/readall-method.md b/Language/Reference/User-Interface-Help/readall-method.md index 1cd9ab8c43b..4a1d16300f0 100644 --- a/Language/Reference/User-Interface-Help/readall-method.md +++ b/Language/Reference/User-Interface-Help/readall-method.md @@ -17,9 +17,13 @@ ms.date: 06/08/2017 **Description** Reads an entire **TextStream** file and returns the resulting string. - **Syntax** - _object_. **ReadAll** + +## Syntax + +_object_. **ReadAll** The _object_ is always the name of a **TextStream** object. - **Remarks** + +## Remarks + For large files, using the **ReadAll** method wastes memory resources. Other techniques should be used to input a file, such as reading a file line by line. diff --git a/Language/Reference/User-Interface-Help/readline-method.md b/Language/Reference/User-Interface-Help/readline-method.md index 121d923b32e..61ea268ed61 100644 --- a/Language/Reference/User-Interface-Help/readline-method.md +++ b/Language/Reference/User-Interface-Help/readline-method.md @@ -17,7 +17,9 @@ ms.date: 06/08/2017 **Description** Reads an entire line (up to, but not including, the newline character) from a **TextStream** file and returns the resulting string. - **Syntax** - _object_. **ReadLine** + +## Syntax + +_object_. **ReadLine** The _object_ argument is always the name of a **TextStream** object. diff --git a/Language/Reference/User-Interface-Help/redim-statement.md b/Language/Reference/User-Interface-Help/redim-statement.md index 956adbc3f71..18728e0fd1a 100644 --- a/Language/Reference/User-Interface-Help/redim-statement.md +++ b/Language/Reference/User-Interface-Help/redim-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Used at [procedure level](../../Glossary/vbe-glossary.md) to reallocate storage space for dynamic array[variables](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **ReDim** [ **Preserve** ] _varname_**(**_subscripts_**)** [ **As**_type_ ] [ **,**_varname_**(**_subscripts_**)** [ **As**_type_ ]] **. . .** +**ReDim** [ **Preserve** ] _varname_**(**_subscripts_**)** [ **As**_type_ ] [ **,**_varname_**(**_subscripts_**)** [ **As**_type_ ]] **. . .** The **ReDim** statement syntax has these parts: @@ -27,7 +27,8 @@ The **ReDim** statement syntax has these parts: | _subscripts_|Required. Dimensions of an array variable; up to 60 multiple dimensions may be declared. The _subscripts_[argument](../../Glossary/vbe-glossary.md) uses the following syntax: [ _lower_**To** ] _upper_ [ **,** [ _lower_**To** ] _upper_ ] **. . .** When not explicitly stated in _lower_, the lower bound of an array is controlled by the **Option** **Base** statement. The lower bound is zero if no **Option** **Base** statement is present.| | _type_|Optional. [Data type](../../Glossary/vbe-glossary.md) of the variable; may be[Byte](../../Glossary/vbe-glossary.md), [Boolean](../../Glossary/vbe-glossary.md), [Integer](../../Glossary/vbe-glossary.md), [Long](../../Glossary/vbe-glossary.md), [Currency](../../Glossary/vbe-glossary.md), [Single](../../Glossary/vbe-glossary.md), [Double](../../Glossary/vbe-glossary.md), [Decimal](../../Glossary/vbe-glossary.md) (not currently supported),[Date](../../Glossary/vbe-glossary.md), [String](../../Glossary/vbe-glossary.md) (for variable-length strings), **String** * _length_ (for fixed-length strings),[Object](../../Glossary/vbe-glossary.md), [Variant](../../Glossary/vbe-glossary.md), a [user-defined type](../../Glossary/vbe-glossary.md), or an [object type](../../Glossary/vbe-glossary.md). Use a separate **As**_type_ clause for each variable being defined. For a **Variant** containing an array, _type_ describes the type of each element of the array, but doesn't change the **Variant** to some other type.| - **Remarks** +## Remarks + The **ReDim**[statement](../../Glossary/vbe-glossary.md) is used to size or resize a dynamic array that has already been formally declared using a **Private**, **Public**, or **Dim** statement with empty parentheses (without dimension subscripts). You can use the **ReDim** statement repeatedly to change the number of elements and dimensions in an array. However, you can't declare an array of one data type and later use **ReDim** to change the array to another data type, unless the array is contained in a **Variant**. If the array is contained in a **Variant**, the type of the elements can be changed using an **As**_type_ clause, unless you're using the **Preserve** keyword, in which case, no changes of data type are permitted. If you use the **Preserve** keyword, you can resize only the last array dimension and you can't change the number of dimensions at all. For example, if your array has only one dimension, you can resize that dimension because it is the last and only dimension. However, if your array has two or more dimensions, you can change the size of only the last dimension and still preserve the contents of the array. The following example shows how you can increase the size of the last dimension of a dynamic array without erasing any existing data contained in the array. diff --git a/Language/Reference/User-Interface-Help/redoaction-method.md b/Language/Reference/User-Interface-Help/redoaction-method.md index ec8664f4a28..3ae6bf06874 100644 --- a/Language/Reference/User-Interface-Help/redoaction-method.md +++ b/Language/Reference/User-Interface-Help/redoaction-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Reverses the effect of the most recent Undo action. - **Syntax** - _Boolean_ = _object_. **RedoAction** + +## Syntax + +_Boolean_ = _object_. **RedoAction** The **RedoAction** method syntax has these parts: @@ -25,7 +27,8 @@ The **RedoAction** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + Redo reverses the last Undo, which is not necessarily the last action taken. Not all actions can be undone. For example, after pasting text into a **TextBox** and then choosing the Undo command to remove the text, you can choose the Redo command to put the text back in. diff --git a/Language/Reference/User-Interface-Help/reference-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/reference-object-vba-add-in-object-model.md index 94ab7e56900..b47d8e7cf57 100644 --- a/Language/Reference/User-Interface-Help/reference-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/reference-object-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Represents a reference to a [type library](../../Glossary/vbe-glossary.md) or a[project](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + Use the **Reference** object to verify whether a reference is still valid. The **IsBroken** property returns **True** if the reference no longer points to a valid reference. The **BuiltIn** property returns **True** if the reference is a default reference that can't be moved or removed. Use the **Name** property to determine if the reference you want to add or remove is the correct one. diff --git a/Language/Reference/User-Interface-Help/references-collection-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/references-collection-vba-add-in-object-model.md index c51b6e18537..639a34b1518 100644 --- a/Language/Reference/User-Interface-Help/references-collection-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/references-collection-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Represents the set of references in the [project](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + Use the **References** collection to add or remove references. The **References** collection is the same as the set of references selected in the **References** dialog box. diff --git a/Language/Reference/User-Interface-Help/references-property.md b/Language/Reference/User-Interface-Help/references-property.md index 035b935914b..cd89076b3f6 100644 --- a/Language/Reference/User-Interface-Help/references-property.md +++ b/Language/Reference/User-Interface-Help/references-property.md @@ -16,6 +16,8 @@ ms.date: 06/08/2017 Returns the set of references in a project. Read-only. - **Remarks** + +## Remarks + The **References** property is an accessor property (that is, a property that returns an object of the same type as the property name). diff --git a/Language/Reference/User-Interface-Help/referencesevents-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/referencesevents-object-vba-add-in-object-model.md index f1b363218c4..6d637e7f320 100644 --- a/Language/Reference/User-Interface-Help/referencesevents-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/referencesevents-object-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returned by the **ReferencesEvents** property. - **Remarks** + +## Remarks + The **ReferencesEvents** object is the source of events that occur when a reference is added to or removed from a[project](../../Glossary/vbe-glossary.md). The ItemAdded event is triggered after a reference is added to a project. The ItemRemoved event is triggered after a reference is removed from a project. diff --git a/Language/Reference/User-Interface-Help/referencesevents-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/referencesevents-property-vba-add-in-object-model.md index 731944ebcaf..889d9b5e6d8 100644 --- a/Language/Reference/User-Interface-Help/referencesevents-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/referencesevents-property-vba-add-in-object-model.md @@ -22,6 +22,7 @@ The setting for the [argument](../../Glossary/vbe-glossary.md) you pass to the * |:-----|:-----| | _vbproject_|If _vbproject_ points to **Nothing**, the object that is returned will supply events for the **References** collections of all **VBProject** objects in the **VBProjects** collection.If _vbproject_ points to a valid **VBProject** object, the object that is returned will supply events for only the **References** collection for that[project](../../Glossary/vbe-glossary.md).| - **Remarks** +## Remarks + The **ReferencesEvents** property takes an argument and returns an[event source object](../../Glossary/vbe-glossary.md). The **ReferencesEvents** object is the source for events that are triggered when references are added or removed. diff --git a/Language/Reference/User-Interface-Help/rem-statement.md b/Language/Reference/User-Interface-Help/rem-statement.md index 50cf8c1cd5e..1a3711ef01b 100644 --- a/Language/Reference/User-Interface-Help/rem-statement.md +++ b/Language/Reference/User-Interface-Help/rem-statement.md @@ -13,14 +13,16 @@ ms.date: 06/08/2017 Used to include explanatory remarks in a program. - **Syntax** +## Syntax - **Rem**_comment_ +**Rem**_comment_ You can also use the following syntax: **'**_comment_ The optional _comment_[argument](../../Glossary/vbe-glossary.md) is the text of any[comment](../../Glossary/vbe-glossary.md) you want to include. A space is required between the **Rem**[keyword](../../Glossary/vbe-glossary.md) and _comment_. - **Remarks** + +## Remarks + If you use [line numbers](../../Glossary/vbe-glossary.md) or[line labels](../../Glossary/vbe-glossary.md), you can branch from a **GoTo** or **GoSub**[statement](../../Glossary/vbe-glossary.md) to a line containing a **Rem** statement. Execution continues with the first executable statement following the **Rem** statement. If the **Rem** keyword follows other statements on a line, it must be separated from the statements by a colon (**:**). You can use an apostrophe (**'**) instead of the **Rem** keyword. When you use an apostrophe, the colon is not required after other statements. diff --git a/Language/Reference/User-Interface-Help/remove-method-filesystemobject-object.md b/Language/Reference/User-Interface-Help/remove-method-filesystemobject-object.md index 0490f61b0d8..f017d117b53 100644 --- a/Language/Reference/User-Interface-Help/remove-method-filesystemobject-object.md +++ b/Language/Reference/User-Interface-Help/remove-method-filesystemobject-object.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Removes a key, item pair from a **Dictionary** object. - **Syntax** - _object_. **Remove(**_key_**)** + +## Syntax + +_object_. **Remove(**_key_**)** The **Remove** method syntax has these parts: @@ -25,7 +27,8 @@ The **Remove** method syntax has these parts: | _object_|Required. Always the name of a **Dictionary** object.| | _key_|Required. _Key_ associated with the key, item pair you want to remove from the **Dictionary** object.| - **Remarks** +## Remarks + An error occurs if the specified key, item pair does not exist. The following code illustrates use of the **Remove** method: diff --git a/Language/Reference/User-Interface-Help/remove-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/remove-method-vba-add-in-object-model.md index 08746c39ad6..63de1adc37a 100644 --- a/Language/Reference/User-Interface-Help/remove-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/remove-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Removes an item from a [collection](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.Remove(**_component_**)** + +## Syntax + +_object_**.Remove(**_component_**)** The **Remove** syntax has these parts: @@ -24,7 +26,8 @@ The **Remove** syntax has these parts: | _object_|Required. An [object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list.| | _component_|Required. For the **LinkedWindows** collection, an object. For the **References** collection, a reference to a[type library](../../Glossary/vbe-glossary.md) or a[project](../../Glossary/vbe-glossary.md). For the **VBComponents** collection, an enumerated[constant](../../Glossary/vbe-glossary.md) representing a[class module](../../Glossary/vbe-glossary.md), a form, or a [standard module](../../Glossary/vbe-glossary.md). For the **VBProjects** collection, a standalone project.| - **Remarks** +## Remarks + When used on the **LinkedWindows** collection, the **Remove** method removes a window from the collection of currently[linked windows](../../Glossary/vbe-glossary.md). The removed window becomes a floating window that has its own [linked window frame](../../Glossary/vbe-glossary.md). The **Remove** method can only be used on a standalone project. It generates a run-time error if you try to use it on a host project. diff --git a/Language/Reference/User-Interface-Help/remove-method-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/remove-method-visual-basic-for-applications.md index 2f7f8558f7c..04dd542cbf7 100644 --- a/Language/Reference/User-Interface-Help/remove-method-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/remove-method-visual-basic-for-applications.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Removes a [member](../../Glossary/vbe-glossary.md) from a **Collection** object. - **Syntax** - _object_**.Remove**_index_ + +## Syntax + +_object_**.Remove**_index_ The **Remove** method syntax has the following object qualifier and part: @@ -24,7 +26,8 @@ The **Remove** method syntax has the following object qualifier and part: | _object_|Required. An [object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list.| | _index_|Required. An [expression](../../Glossary/vbe-glossary.md) that specifies the position of a member of the[collection](../../Glossary/vbe-glossary.md). If a [numeric expression](../../Glossary/vbe-glossary.md), _index_ must be a number from 1 to the value of the collection's **Count**[property](../../Glossary/vbe-glossary.md). If a [string expression](../../Glossary/vbe-glossary.md), _index_ must correspond to the **_key_**[argument](../../Glossary/vbe-glossary.md) specified when the member referred to was added to the collection.| - **Remarks** +## Remarks + If the value provided as _index_ doesn't match an existing member of the collection, an error occurs. ## Example diff --git a/Language/Reference/User-Interface-Help/remove-method.md b/Language/Reference/User-Interface-Help/remove-method.md index cb6f2127cc6..b12bd4becbb 100644 --- a/Language/Reference/User-Interface-Help/remove-method.md +++ b/Language/Reference/User-Interface-Help/remove-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Removes a member from a [collection](../../Glossary/vbe-glossary.md); or, removes a control from a **Frame**, **Page**, or form. - **Syntax** - _object_. **Remove(**_collectionindex_**)** + +## Syntax + +_object_. **Remove(**_collectionindex_**)** The **Remove** method syntax has these parts: @@ -26,6 +28,7 @@ The **Remove** method syntax has these parts: | _object_|Required. A valid object.| | _collectionindex_|Required. A member's position, or index, within a collection. Numeric as well as string values are acceptable. If the value is a number, the minimum value is zero, and the maximum value is one less than the number of members in the collection. If the value is a string, it must correspond to a valid member name.| - **Remarks** +## Remarks + This method deletes any control that was added at [run time](../../Glossary/vbe-glossary.md). However, attempting to delete a control that was added at [design time](../../Glossary/vbe-glossary.md) will result in an error. diff --git a/Language/Reference/User-Interface-Help/removeall-method.md b/Language/Reference/User-Interface-Help/removeall-method.md index df3c35dbf98..b0cc40169ed 100644 --- a/Language/Reference/User-Interface-Help/removeall-method.md +++ b/Language/Reference/User-Interface-Help/removeall-method.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** The **RemoveAll** method removes all key, item pairs from a **Dictionary** object. - **Syntax** - _object_. **RemoveAll** + +## Syntax + +_object_. **RemoveAll** The _object_ is always the name of a **Dictionary** object. - **Remarks** + +## Remarks + The following code illustrates use of the **RemoveAll** method: diff --git a/Language/Reference/User-Interface-Help/removecontrol-event.md b/Language/Reference/User-Interface-Help/removecontrol-event.md index 8a01f051514..a67e9fdffc8 100644 --- a/Language/Reference/User-Interface-Help/removecontrol-event.md +++ b/Language/Reference/User-Interface-Help/removecontrol-event.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Occurs when a control is deleted from the [container](../../Glossary/vbe-glossary.md). - **Syntax** + +## Syntax + For MultiPage **Private Sub**_object_ _**RemoveControl(**_index_**As Long**, _ctrl_**As Control)** For all other controls **Private Sub**_object_ _**RemoveControl(**_ctrl_**As Control)** The **RemoveControl** event syntax has these parts: @@ -28,6 +30,7 @@ The **RemoveControl** event syntax has these parts: | _index_|Required. The index of the page in a **MultiPage** that contained the deleted control.| | _ctrl_|Required. The deleted control.| - **Remarks** +## Remarks + This event occurs when a control is deleted from the form, not when a control is unloaded due to a form being closed. diff --git a/Language/Reference/User-Interface-Help/removeitem-method.md b/Language/Reference/User-Interface-Help/removeitem-method.md index 98d7e33d682..f18787ababf 100644 --- a/Language/Reference/User-Interface-Help/removeitem-method.md +++ b/Language/Reference/User-Interface-Help/removeitem-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Removes a row from the list in a list box or combo box. - **Syntax** - _Boolean_ = _object_. **RemoveItem**_index_ + +## Syntax + +_Boolean_ = _object_. **RemoveItem**_index_ The **RemoveItem** method syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/rename-toolbar-dialog-box.md b/Language/Reference/User-Interface-Help/rename-toolbar-dialog-box.md index e34d885972f..a0efb350fb7 100644 --- a/Language/Reference/User-Interface-Help/rename-toolbar-dialog-box.md +++ b/Language/Reference/User-Interface-Help/rename-toolbar-dialog-box.md @@ -18,7 +18,7 @@ ms.date: 06/08/2017 Allows you to rename your custom toolbars. -## Dialog Box Option +## Dialog Box Options **Toolbar name** diff --git a/Language/Reference/User-Interface-Help/repaint-method.md b/Language/Reference/User-Interface-Help/repaint-method.md index 15c1fe59091..ec2b2a9cbbd 100644 --- a/Language/Reference/User-Interface-Help/repaint-method.md +++ b/Language/Reference/User-Interface-Help/repaint-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Updates the display by redrawing the form or page. - **Syntax** - _Boolean_ = _object_. **Repaint** + +## Syntax + +_Boolean_ = _object_. **Repaint** The **Repaint** method syntax has these parts: @@ -25,6 +27,7 @@ The **Repaint** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The **Repaint** method is useful if the contents or appearance of an object changes significantly, and you don't want to wait until the system automatically repaints the area. diff --git a/Language/Reference/User-Interface-Help/replace-function.md b/Language/Reference/User-Interface-Help/replace-function.md index c81f8b4bf5f..1adc826181c 100644 --- a/Language/Reference/User-Interface-Help/replace-function.md +++ b/Language/Reference/User-Interface-Help/replace-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns a string in which a specified substring has been replaced with another substring a specified number of times. - **Syntax** - **Replace( _expression_,** **_find_,** **_replace_** [ **,** **_start_** [ **,** **_count_** [ **,** **_compare_** ]]] **)** + +## Syntax + +**Replace( _expression_,** **_find_,** **_replace_** [ **,** **_start_** [ **,** **_count_** [ **,** **_compare_** ]]] **)** The **Replace** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -53,6 +55,7 @@ The **_compare_** argument can have the following values: |**_start_** > **Len( _expression_ )**|Zero-length string.| |**_count_** is 0|Copy of **_expression_**.| - **Remarks** +## Remarks + The return value of the **Replace** function is a string, with substitutions made, that begins at the position specified by **_start_** and and concludes at the end of the **_expression_** string. It is not a copy of the original string from start to finish. diff --git a/Language/Reference/User-Interface-Help/replaceline-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/replaceline-method-vba-add-in-object-model.md index a469596e3ec..d62b08be520 100644 --- a/Language/Reference/User-Interface-Help/replaceline-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/replaceline-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Replaces an existing line of code with a specified line of code. - **Syntax** - _object_**.ReplaceLine(**_line_, _code_**)** + +## Syntax + +_object_**.ReplaceLine(**_line_, _code_**)** The **ReplaceLine** syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/reset-statement.md b/Language/Reference/User-Interface-Help/reset-statement.md index 0de1f38dcfd..5d15d94d426 100644 --- a/Language/Reference/User-Interface-Help/reset-statement.md +++ b/Language/Reference/User-Interface-Help/reset-statement.md @@ -13,11 +13,12 @@ ms.date: 06/08/2017 Closes all disk files opened using the **Open** statement. - **Syntax** +## Syntax - **Reset** +**Reset** + +## Remarks - **Remarks** The **Reset** statement closes all active files opened by the **Open** statement and writes the contents of all file buffers to disk. ## Example diff --git a/Language/Reference/User-Interface-Help/resize-event.md b/Language/Reference/User-Interface-Help/resize-event.md index 9ae15ce079b..8a34a8c2d92 100644 --- a/Language/Reference/User-Interface-Help/resize-event.md +++ b/Language/Reference/User-Interface-Help/resize-event.md @@ -16,9 +16,13 @@ ms.date: 06/08/2017 Occurs when a user form is resized. - **Syntax** - **Private Sub UserForm_Resize()** - **Remarks** + +## Syntax + +**Private Sub UserForm_Resize()** + +## Remarks + Use a Resize event [procedure](../../Glossary/vbe-glossary.md) to move or resize[controls](../../Glossary/vbe-glossary.md) when the parent **UserForm** is resized. You can also use this event procedure to recalculate[variables](../../Glossary/vbe-glossary.md) or[properties](../../Glossary/vbe-glossary.md). ## Example diff --git a/Language/Reference/User-Interface-Help/resume-statement.md b/Language/Reference/User-Interface-Help/resume-statement.md index cd35cc8bae6..bf865656458 100644 --- a/Language/Reference/User-Interface-Help/resume-statement.md +++ b/Language/Reference/User-Interface-Help/resume-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Resumes execution after an error-handling routine is finished. - **Syntax** +## Syntax - **Resume** [ **0** ] +**Resume** [ **0** ] **Resume** **Next** **Resume**_line_ @@ -28,7 +28,8 @@ The **Resume** statement syntax can have any of the following forms: |**Resume** **Next**|If the error occurred in the same procedure as the error handler, execution resumes with the statement immediately following the statement that caused the error. If the error occurred in a called procedure, execution resumes with the statement immediately following the statement that last called out of the procedure containing the error-handling routine (or **On Error Resume Next** statement).| |**Resume**_line_|Execution resumes at _line_ specified in the required _line_[argument](../../Glossary/vbe-glossary.md). The _line_ argument is a[line label](../../Glossary/vbe-glossary.md) or[line number](../../Glossary/vbe-glossary.md) and must be in the same procedure as the error handler.| - **Remarks** +## Remarks + If you use a **Resume** statement anywhere except in an error-handling routine, an error occurs. ## Example diff --git a/Language/Reference/User-Interface-Help/rgb-function.md b/Language/Reference/User-Interface-Help/rgb-function.md index 6e9eaf4df3e..86aa2fd37b9 100644 --- a/Language/Reference/User-Interface-Help/rgb-function.md +++ b/Language/Reference/User-Interface-Help/rgb-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) whole number representing an RGB color value. - **Syntax** - **RGB( _red_, _green_, _blue_ )** + +## Syntax + +**RGB( _red_, _green_, _blue_ )** The **RGB** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,7 +27,8 @@ The **RGB** function syntax has these[named arguments](../../Glossary/vbe-gloss |**_green_**|Required; **Variant** (**Integer**). Number in the range 0-255, inclusive, that represents the green component of the color.| |**_blue_**|Required; **Variant** (**Integer**). Number in the range 0-255, inclusive, that represents the blue component of the color.| - **Remarks** +## Remarks + Application [methods](../../Glossary/vbe-glossary.md) and[properties](../../Glossary/vbe-glossary.md) that accept a color specification expect that specification to be a number representing an RGB color value. An RGB color value specifies the relative intensity of red, green, and blue to cause a specific color to be displayed. The value for any [argument](../../Glossary/vbe-glossary.md) to **RGB** that exceeds 255 is assumed to be 255. The following table lists some standard colors and the red, green, and blue values they include: diff --git a/Language/Reference/User-Interface-Help/right-function.md b/Language/Reference/User-Interface-Help/right-function.md index 7cf5693b0df..8cd303f93f1 100644 --- a/Language/Reference/User-Interface-Help/right-function.md +++ b/Language/Reference/User-Interface-Help/right-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) containing a specified number of characters from the right side of a string. - **Syntax** - **Right** (**_string_**, **_length_**) + +## Syntax + +**Right** (**_string_**, **_length_**) The **Right** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -24,7 +26,8 @@ The **Right** function syntax has these[named arguments](../../Glossary/vbe-glo |**_string_**|Required. [String expression](../../Glossary/vbe-glossary.md) from which the rightmost characters are returned. If **_string_** contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned.| |**_length_**|Required; **Variant** (**Long**).[Numeric expression](../../Glossary/vbe-glossary.md) indicating how many characters to return. If 0, a zero-length string ("") is returned. If greater than or equal to the number of characters in **_string_**, the entire string is returned.| - **Remarks** +## Remarks + To determine the number of characters in **_string_**, use the **Len** function. **Note** Use the **RightB** function with byte data contained in a string. Instead of specifying the number of characters to return, **_length_** specifies the number of bytes. diff --git a/Language/Reference/User-Interface-Help/righttoleft-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/righttoleft-property-microsoft-forms.md index 7c0473bd773..2b38ffd2451 100644 --- a/Language/Reference/User-Interface-Help/righttoleft-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/righttoleft-property-microsoft-forms.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Specifies whether a given form supports bidirectional characteristics. - **Syntax** - _expression_**.RightToLeft** [= _value_ ] - **Remarks** - **RightToLeft** is a new property of the Microsoft Forms 2.0 form that the specified control is placed on; it's not a property of the control. Note, however, that **RightToLeft** affects both the form and any controls that are placed on it. The following table describes the two possible settings for this property. + +## Syntax + +_expression_**.RightToLeft** [= _value_ ] + +## Remarks + +**RightToLeft** is a new property of the Microsoft Forms 2.0 form that the specified control is placed on; it's not a property of the control. Note, however, that **RightToLeft** affects both the form and any controls that are placed on it. The following table describes the two possible settings for this property. |**Setting**|**Value**| diff --git a/Language/Reference/User-Interface-Help/righttoleft-property.md b/Language/Reference/User-Interface-Help/righttoleft-property.md index da6bf71b848..bd3c100500e 100644 --- a/Language/Reference/User-Interface-Help/righttoleft-property.md +++ b/Language/Reference/User-Interface-Help/righttoleft-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Returns a Boolean value that indicates the text display direction and controls the visual appearance on a bidirectional system. - **Remarks** + +## Remarks + The settings for the **RightToLeft** property are: diff --git a/Language/Reference/User-Interface-Help/rmdir-statement.md b/Language/Reference/User-Interface-Help/rmdir-statement.md index 8f5ff8483e3..9a96af94443 100644 --- a/Language/Reference/User-Interface-Help/rmdir-statement.md +++ b/Language/Reference/User-Interface-Help/rmdir-statement.md @@ -13,12 +13,14 @@ ms.date: 06/08/2017 Removes an existing directory or folder. - **Syntax** +## Syntax - **RmDir**_path_ +**RmDir**_path_ The required _path_[argument](../../Glossary/vbe-glossary.md) is a[string expression](../../Glossary/vbe-glossary.md) that identifies the directory or folder to be removed. The _path_ may include the drive. If no drive is specified, **RmDir** removes the directory or folder on the current drive. - **Remarks** + +## Remarks + An error occurs if you try to use **RmDir** on a directory or folder containing files. Use the **Kill** statement to delete all files before attempting to remove a directory or folder. ## Example diff --git a/Language/Reference/User-Interface-Help/rnd-function.md b/Language/Reference/User-Interface-Help/rnd-function.md index 8cff2feae1d..cb20e1f3299 100644 --- a/Language/Reference/User-Interface-Help/rnd-function.md +++ b/Language/Reference/User-Interface-Help/rnd-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Single** containing a random number. - **Syntax** - **Rnd** [ **(**_number_**)** ] + +## Syntax + +**Rnd** [ **(**_number_**)** ] The optional _number_[argument](../../Glossary/vbe-glossary.md) is a[Single](../../Glossary/vbe-glossary.md) or any valid[numeric expression](../../Glossary/vbe-glossary.md). **Return Values** @@ -27,7 +29,8 @@ The optional _number_[argument](../../Glossary/vbe-glossary.md) is a[Single](.. |Equal to zero|The most recently generated number.| |Not supplied|The next random number in the sequence.| - **Remarks** +## Remarks + The **Rnd** function returns a value less than 1 but greater than or equal to zero. The value of _number_ determines how **Rnd** generates a random number: For any given initial seed, the same number sequence is generated because each successive call to the **Rnd** function uses the previous number as a seed for the next number in the sequence. diff --git a/Language/Reference/User-Interface-Help/rootfolder-property.md b/Language/Reference/User-Interface-Help/rootfolder-property.md index 06b3f234182..3577101ce35 100644 --- a/Language/Reference/User-Interface-Help/rootfolder-property.md +++ b/Language/Reference/User-Interface-Help/rootfolder-property.md @@ -17,9 +17,13 @@ ms.date: 06/08/2017 **Description** Returns a **Folder** object representing the root folder of a specified drive. Read-only. - **Syntax** - _object_. **RootFolder** + +## Syntax + +_object_. **RootFolder** The _object_ is always a **Drive** object. - **Remarks** + +## Remarks + All the files and folders contained on the drive can be accessed using the returned **Folder** object. diff --git a/Language/Reference/User-Interface-Help/round-function.md b/Language/Reference/User-Interface-Help/round-function.md index f2554c0991c..1ded995bfca 100644 --- a/Language/Reference/User-Interface-Help/round-function.md +++ b/Language/Reference/User-Interface-Help/round-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns a number rounded to a specified number of decimal places. - **Syntax** - **Round(**_expression_ [ **,**_numdecimalplaces_ ] **)** + +## Syntax + +**Round(**_expression_ [ **,**_numdecimalplaces_ ] **)** The **Round** function syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/rowsource-property.md b/Language/Reference/User-Interface-Help/rowsource-property.md index 49c98521029..4055ec7ef1a 100644 --- a/Language/Reference/User-Interface-Help/rowsource-property.md +++ b/Language/Reference/User-Interface-Help/rowsource-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the source providing a list for a **ComboBox** or **ListBox**. - **Syntax** - _object_. **RowSource** [= _String_ ] + +## Syntax + +_object_. **RowSource** [= _String_ ] The **RowSource** property syntax has these parts: @@ -26,6 +28,7 @@ The **RowSource** property syntax has these parts: | _object_|Required. A valid object.| | _String_|Optional. The source of the list for the **ComboBox** or **ListBox**.| - **Remarks** +## Remarks + The **RowSource** property accepts worksheet ranges from Microsoft Excel. diff --git a/Language/Reference/User-Interface-Help/rset-statement.md b/Language/Reference/User-Interface-Help/rset-statement.md index 37a5459aa76..c95c6dfabd2 100644 --- a/Language/Reference/User-Interface-Help/rset-statement.md +++ b/Language/Reference/User-Interface-Help/rset-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Right aligns a string within a string [variable](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **RSet**_stringvar_**=**_string_ +**RSet**_stringvar_**=**_string_ The **RSet** statement syntax has these parts: @@ -25,7 +25,8 @@ The **RSet** statement syntax has these parts: | _stringvar_|Required. Name of string variable.| | _string_|Required. [String expression](../../Glossary/vbe-glossary.md) to be right-aligned within _stringvar_.| - **Remarks** +## Remarks + If _stringvar_ is longer than _string_, **RSet** replaces any leftover characters in _stringvar_ with spaces, back to its beginning. **Note** **RSet** can't be used with[user-defined types](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/saveas-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/saveas-method-vba-add-in-object-model.md index 232f9052afd..be3d40461de 100644 --- a/Language/Reference/User-Interface-Help/saveas-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/saveas-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Saves a project to a given location using a new filename. - **Syntax** - _object_**.SaveAs** **(**_newfilename_**As String)** + +## Syntax + +_object_**.SaveAs** **(**_newfilename_**As String)** The **SaveAs** method syntax has these parts: @@ -24,7 +26,8 @@ The **SaveAs** method syntax has these parts: | _object_|An [object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list.| | _newfilename_|Required. A [string expression](../../Glossary/vbe-glossary.md) specifying the new filename for the component to be saved.| - **Remarks** +## Remarks + If a new path name is given, it is used. Otherwise, the old path name is used. If the new filename is invalid or refers to a read-only file, an error occurs. The **SaveAs** method can only be used on standalone projects. It generates a run-time error if you use it with a host project. diff --git a/Language/Reference/User-Interface-Help/saved-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/saved-property-vba-add-in-object-model.md index 11a14d74ae9..cf9572d8f3f 100644 --- a/Language/Reference/User-Interface-Help/saved-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/saved-property-vba-add-in-object-model.md @@ -23,7 +23,8 @@ The **Saved** property returns these values: |**True**|The object has not been edited since the last time it was saved.| |**False**|The object has been edited since the last time it was saved.| - **Remarks** +## Remarks + The **SaveAs** method sets the **Saved** property to **True**. **Note** If you set the **Saved** property to **False** in code, it returns **False**, and the object is marked as if it were edited since the last time it was saved. diff --git a/Language/Reference/User-Interface-Help/savesetting-statement.md b/Language/Reference/User-Interface-Help/savesetting-statement.md index e0bb4c74bbb..5095d93c518 100644 --- a/Language/Reference/User-Interface-Help/savesetting-statement.md +++ b/Language/Reference/User-Interface-Help/savesetting-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Saves or creates an application entry in the application's entry in the Windows [registry](../../Glossary/vbe-glossary.md) or (on the Macintosh) information in the application's initialization file. - **Syntax** +## Syntax - **SaveSetting _appname_,** **_section,_**_key, setting_ +**SaveSetting _appname_,** **_section,_**_key, setting_ The **SaveSetting** statement syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -27,7 +27,8 @@ The **SaveSetting** statement syntax has these[named arguments](../../Glossary/ |**_key_**|Required. String expression containing the name of the key setting being saved.| |**_setting_**|Required. [Expression](../../Glossary/vbe-glossary.md) containing the value that **_key_** is being set to.| - **Remarks** +## Remarks + An error occurs if the key setting can't be saved for any reason. ## Example diff --git a/Language/Reference/User-Interface-Help/scroll-event.md b/Language/Reference/User-Interface-Help/scroll-event.md index 8eb1b9bc2a8..db00d132932 100644 --- a/Language/Reference/User-Interface-Help/scroll-event.md +++ b/Language/Reference/User-Interface-Help/scroll-event.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Occurs when the scroll box is repositioned. - **Syntax** + +## Syntax + For ScrollBar **Private Sub**_object_ _**Scroll( )** For MultiPage **Private Sub**_object_ _**Scroll(**_index_**As Long**, _ActionX_**As fmScrollAction**, _ActionY_**As fmScrollAction**, **ByVal**_RequestDx_**As Single**, **ByVal**_RequestDy_**As Single**, **ByVal**_ActualDx_**As MSForms.ReturnSingle**, **ByVal**_ActualDy_**As MSForms.ReturnSingle)** For Frame **Private Sub**_object_ _**Scroll(**_ActionX_**As fmScrollAction**, _ActionY_**As fmScrollAction**, **ByVal**_RequestDx_**As Single**, **ByVal**_RequestDy_**As Single**, **ByVal**_ActualDx_**As MSForms.ReturnSingle**, **ByVal**_ActualDy_**As MSForms.ReturnSingle)** @@ -51,7 +53,8 @@ The settings for _ActionX_ and _ActionY_ are: | _fmScrollActionControlRequest_|9|A control asked its container to scroll. The amount of movement depends on the specific control and container involved.| | _fmScrollActionFocusRequest_|10|The user moved to a different control. The amount of movement depends on the placement of the selected control, and generally has the effect of moving the selected control so it is completely visible to the user.| - **Remarks** +## Remarks + The Scroll events associated with a form, **Frame**, or **Page** return the following arguments: _ActionX_, _ActionY_, _ActualX_, and _ActualY_. _ActionX_ and _ActionY_ identify the action that occurred. _ActualX_ and _ActualY_ identify the distance that the scroll box traveled. The default action is to calculate the new position of the scroll box and then scroll to that position. You can initiate a Scroll event by issuing a **Scroll** method for a form, **Frame**, or **Page**. Users can generate Scroll events by moving the scroll box. diff --git a/Language/Reference/User-Interface-Help/scroll-method.md b/Language/Reference/User-Interface-Help/scroll-method.md index 044c27f3b36..0e09e42e556 100644 --- a/Language/Reference/User-Interface-Help/scroll-method.md +++ b/Language/Reference/User-Interface-Help/scroll-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Moves the scroll bar on an object. - **Syntax** - _object_. **Scroll(** [ _ActionX_ [, _ActionY_ ]] **)** + +## Syntax + +_object_. **Scroll(** [ _ActionX_ [, _ActionY_ ]] **)** The **Scroll** method syntax has these parts: @@ -41,6 +43,7 @@ The settings for _ActionX_ and _ActionY_ are: | _fmScrollActionBegin_|5|Move to the top of a vertical scroll bar or to the left end of a horizontal scroll bar.| | _fmScrollActionEnd_|6|Move to the bottom of a vertical scroll bar or to the right end of a horizontal scroll bar.| - **Remarks** +## Remarks + The **Scroll** method applies scroll bars that appear on a form, **Frame**, or **Page** that is larger than its display area. This method does not apply to the stand-alone **ScrollBar** or to scroll bars that appear on a **TextBox**. diff --git a/Language/Reference/User-Interface-Help/scrollbar-control.md b/Language/Reference/User-Interface-Help/scrollbar-control.md index b5493d493fa..f242559a63c 100644 --- a/Language/Reference/User-Interface-Help/scrollbar-control.md +++ b/Language/Reference/User-Interface-Help/scrollbar-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets the value of another control based on the position of the scroll box. - **Remarks** + +## Remarks + A **ScrollBar** is a stand-alone control you can place on a form. It is visually like the scroll bar you see in certain objects such as a **ListBox** or the drop-down portion of a **ComboBox**. However, unlike the scroll bars in these examples, the stand-alone **ScrollBar** is not an integral part of any other control. To use the **ScrollBar** to set or read the value of another control, you must write code for the **ScrollBar's** events and methods. For example, to use the **ScrollBar** to update the value of a **TextBox**, you can write code that reads the **Value** property of the **ScrollBar** and then sets the **Value** property of the **TextBox**. The default property for a **ScrollBar** is the **Value** property. diff --git a/Language/Reference/User-Interface-Help/scrollbars-property.md b/Language/Reference/User-Interface-Help/scrollbars-property.md index 79a33ffc598..a3569aaa2ca 100644 --- a/Language/Reference/User-Interface-Help/scrollbars-property.md +++ b/Language/Reference/User-Interface-Help/scrollbars-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether a control, form, or page has vertical scroll bars, horizontal scroll bars, or both. - **Syntax** - _object_. **ScrollBars** [= _fmScrollBars_ ] + +## Syntax + +_object_. **ScrollBars** [= _fmScrollBars_ ] The **ScrollBars** property syntax has these parts: @@ -37,7 +39,8 @@ The settings for _fmScrollBars_ are: | _fmScrollBarsVertical_|2|Displays a vertical scroll bar.| | _fmScrollBarsBoth_|3|Displays both a horizontal and a vertical scroll bar.| - **Remarks** +## Remarks + If the **KeepScrollBarsVisible** property is **True**, any scroll bar on a form or page is always visible, regardless of whether the object's contents fit within the object's borders. If visible, a scroll bar constrains its scroll box to the visible region of the scroll bar. It also modifies the scroll position as needed to keep the entire scroll bar visible. The range of a scroll bar changes when the value of the **ScrollBars** property changes, the scroll size changes, or the visible size changes. If a scroll bar is not visible, then you can set its scroll position to any value. Negative values and values greater than the scroll size are both valid. diff --git a/Language/Reference/User-Interface-Help/scrollheight-scrollwidth-properties.md b/Language/Reference/User-Interface-Help/scrollheight-scrollwidth-properties.md index 7c1377a072c..dc450f6cad8 100644 --- a/Language/Reference/User-Interface-Help/scrollheight-scrollwidth-properties.md +++ b/Language/Reference/User-Interface-Help/scrollheight-scrollwidth-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Specify the height, in [points](../../Glossary/vbe-glossary.md), of the total area that can be viewed by moving the scroll bars on the control, form, or page. - **Syntax** - _object_. **ScrollHeight** [= _Single_ ] + +## Syntax + +_object_. **ScrollHeight** [= _Single_ ] _object_. **ScrollWidth** [= _Single_ ] The **ScrollHeight** and **ScrollWidth** property syntaxes have these parts: diff --git a/Language/Reference/User-Interface-Help/scrollleft-scrolltop-properties.md b/Language/Reference/User-Interface-Help/scrollleft-scrolltop-properties.md index 9d14381cac4..80e67afdc8b 100644 --- a/Language/Reference/User-Interface-Help/scrollleft-scrolltop-properties.md +++ b/Language/Reference/User-Interface-Help/scrollleft-scrolltop-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Specify the distance, in [points](../../Glossary/vbe-glossary.md), of the left or top edge of the visible form from the left or top edge of the logical form, page, or control. - **Syntax** - _object_. **ScrollLeft** [= _Single_ ] + +## Syntax + +_object_. **ScrollLeft** [= _Single_ ] _object_. **ScrollTop** [= _Single_ ] The **ScrollLeft** and **ScrollTop** property syntaxes have these parts: @@ -25,6 +27,7 @@ The **ScrollLeft** and **ScrollTop** property syntaxes have these parts: | _object_|Required. A valid object.| | _Single_|Optional. The distance from the edge of the form.| - **Remarks** +## Remarks + The minimum value is zero; the maximum value is the difference between the value of the **ScrollWidth** property and the value of the **Width** property for the form or page. diff --git a/Language/Reference/User-Interface-Help/second-function.md b/Language/Reference/User-Interface-Help/second-function.md index fe35d702ebd..f6dc0008aaa 100644 --- a/Language/Reference/User-Interface-Help/second-function.md +++ b/Language/Reference/User-Interface-Help/second-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Integer**) specifying a whole number between 0 and 59, inclusive, representing the second of the minute. - **Syntax** - **Second(**_time_**)** + +## Syntax + +**Second(**_time_**)** The required _time_[argument](../../Glossary/vbe-glossary.md) is any[Variant](../../Glossary/vbe-glossary.md), [numeric expression](../../Glossary/vbe-glossary.md), [string expression](../../Glossary/vbe-glossary.md), or any combination, that can represent a time. If _time_ contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned. ## Example diff --git a/Language/Reference/User-Interface-Help/seek-function.md b/Language/Reference/User-Interface-Help/seek-function.md index aab7f20f8ed..ba42647ed06 100644 --- a/Language/Reference/User-Interface-Help/seek-function.md +++ b/Language/Reference/User-Interface-Help/seek-function.md @@ -11,11 +11,15 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) specifying the current read/write position within a file opened using the **Open** statement. - **Syntax** - **Seek(**_filenumber_**)** + +## Syntax + +**Seek(**_filenumber_**)** The required _filenumber_[argument](../../Glossary/vbe-glossary.md) is an[Integer](../../Glossary/vbe-glossary.md) containing a valid[file number](../../Glossary/vbe-glossary.md). - **Remarks** - **Seek** returns a value between 1 and 2,147,483,647 (equivalent to 2^31 - 1), inclusive. + +## Remarks + +**Seek** returns a value between 1 and 2,147,483,647 (equivalent to 2^31 - 1), inclusive. The following describes the return values for each file access mode. diff --git a/Language/Reference/User-Interface-Help/seek-statement.md b/Language/Reference/User-Interface-Help/seek-statement.md index fd3526393fb..97f8a981d96 100644 --- a/Language/Reference/User-Interface-Help/seek-statement.md +++ b/Language/Reference/User-Interface-Help/seek-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Sets the position for the next read/write operation within a file opened using the **Open** statement. - **Syntax** +## Syntax - **Seek** [ **#** ] _filenumber_, _position_ +**Seek** [ **#** ] _filenumber_, _position_ The **Seek** statement syntax has these parts: @@ -25,7 +25,8 @@ The **Seek** statement syntax has these parts: | _filenumber_|Required. Any valid [file number](../../Glossary/vbe-glossary.md).| | _position_|Required. Number in the range 1 - 2,147,483,647, inclusive, that indicates where the next read/write operation should occur.| - **Remarks** +## Remarks + Record numbers specified in **Get** and **Put** statements override file positioning performed by **Seek**. Performing a file-write operation after a **Seek** operation beyond the end of a file extends the file. If you attempt a **Seek** operation to a negative or zero position, an error occurs. diff --git a/Language/Reference/User-Interface-Help/select-case-statement.md b/Language/Reference/User-Interface-Help/select-case-statement.md index ee0e0a0fb33..f61690f043b 100644 --- a/Language/Reference/User-Interface-Help/select-case-statement.md +++ b/Language/Reference/User-Interface-Help/select-case-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Executes one of several groups of [statements](../../Glossary/vbe-glossary.md), depending on the value of an [expression](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **Select Case**_testexpression_ +**Select Case**_testexpression_ [ **Case**_expressionlist-n_ [ _statements-n_ ]] [ **Case Else** @@ -32,7 +32,8 @@ The **Select Case** statement syntax has these parts: | _statements-n_|Optional. One or more statements executed if _testexpression_ matches any part of _expressionlist-n._| | _elsestatements_|Optional. One or more statements executed if _testexpression_ doesn't match any of the **Case** clause.| - **Remarks** +## Remarks + If _testexpression_ matches any **Case**_expressionlist_ expression, the _statements_ following that **Case** clause are executed up to the next **Case** clause, or, for the last clause, up to **End Select**. Control then passes to the statement following **End Select**. If _testexpression_ matches an _expressionlist_ expression in more than one **Case** clause, only the statements following the first match are executed. The **Case Else** clause is used to indicate the _elsestatements_ to be executed if no match is found between the _testexpression_ and an _expressionlist_ in any of the other **Case** selections. Although not required, it is a good idea to have a **Case Else** statement in your **Select Case** block to handle unforeseen _testexpression_ values. If no **Case**_expressionlist_ matches _testexpression_ and there is no **Case Else** statement, execution continues at the statement following **End Select**. You can use multiple expressions or ranges in each **Case** clause. For example, the following line is valid: diff --git a/Language/Reference/User-Interface-Help/selected-property.md b/Language/Reference/User-Interface-Help/selected-property.md index 12cbcc9925e..dafc2cffcbe 100644 --- a/Language/Reference/User-Interface-Help/selected-property.md +++ b/Language/Reference/User-Interface-Help/selected-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns or sets the selection state of items in a **ListBox**. - **Syntax** - _object_. **Selected(**_index_**)** [= _Boolean_ ] + +## Syntax + +_object_. **Selected(**_index_**)** [= _Boolean_ ] The **Selected** property syntax has these parts: @@ -36,7 +38,8 @@ The settings for _Boolean_ are: |**True**|The item is selected.| |**False**|The item is not selected.| - **Remarks** +## Remarks + The **Selected** property is useful when users can make multiple selections. You can use this property to determine the selected rows in a multi-select list box. You can also use this property to select or deselect rows in a list from code. The default value of this property is based on the current selection state of the **ListBox**. For single-selection list boxes, the **Value** or **ListIndex** properties are recommended for getting and setting the selection. In this case, **ListIndex** returns the index of the selected item. However, in a multiple selection, **ListIndex** returns the index of the row contained within the[focus](../../Glossary/vbe-glossary.md) rectangle, regardless of whether the row is actually selected. diff --git a/Language/Reference/User-Interface-Help/selecteditem-property.md b/Language/Reference/User-Interface-Help/selecteditem-property.md index 125052495c1..9b72c9a1f3e 100644 --- a/Language/Reference/User-Interface-Help/selecteditem-property.md +++ b/Language/Reference/User-Interface-Help/selecteditem-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns the currently selected **Tab** or **Page** object. - **Syntax** - _object_. **SelectedItem** + +## Syntax + +_object_. **SelectedItem** The **SelectedItem** property syntax has these parts: @@ -25,6 +27,7 @@ The **SelectedItem** property syntax has these parts: |:-----|:-----| | _object_|Required. A valid **TabStrip** or **MultiPage**.| - **Remarks** +## Remarks + The **SelectedItem** property is read-only. Use **SelectedItem** to programmatically control the currently selected **Tab** or **Page** object. For example, you can use **SelectedItem** to assign values to properties of a **Tab** or **Page** object. diff --git a/Language/Reference/User-Interface-Help/selectedvbcomponent-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/selectedvbcomponent-property-vba-add-in-object-model.md index 525ffa9d4a6..26411573425 100644 --- a/Language/Reference/User-Interface-Help/selectedvbcomponent-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/selectedvbcomponent-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns the selected component. Read-only. - **Remarks** + +## Remarks + The **SelectedVBComponent** property returns the selected component in the[Project window](../../Glossary/vbe-glossary.md). If the selected item in the **Project** window isn't a component, **SelectedVBComponent** returns **Nothing**. diff --git a/Language/Reference/User-Interface-Help/selectionmargin-property.md b/Language/Reference/User-Interface-Help/selectionmargin-property.md index 767ec8cbb60..7e02f2836f4 100644 --- a/Language/Reference/User-Interface-Help/selectionmargin-property.md +++ b/Language/Reference/User-Interface-Help/selectionmargin-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether the user can select a line of text by clicking in the region to the left of the text. - **Syntax** - _object_. **SelectionMargin** [= _Boolean_ ] + +## Syntax + +_object_. **SelectionMargin** [= _Boolean_ ] The **SelectionMargin** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|Clicking in margin causes selection of text (default).| |**False**|Clicking in margin does not cause selection of text.| - **Remarks** +## Remarks + When the **SelectionMargin** property is **True**, the selection margin occupies a thin strip along the left edge of a control's edit region. When set to **False**, the entire edit region can store text. If the **SelectionMargin** property is set to **True** when a control is printed, the selection margin also prints. diff --git a/Language/Reference/User-Interface-Help/sellength-property.md b/Language/Reference/User-Interface-Help/sellength-property.md index 9522625c244..756df7676ea 100644 --- a/Language/Reference/User-Interface-Help/sellength-property.md +++ b/Language/Reference/User-Interface-Help/sellength-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 The number of characters selected in a text box or the text portion of a combo box. - **Syntax** - _object_. **SelLength** [= _Long_ ] + +## Syntax + +_object_. **SelLength** [= _Long_ ] The **SelLength** property syntax has these parts: @@ -26,7 +28,8 @@ The **SelLength** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. A numeric expression specifying the number of characters selected. For **SelLength** and **SelStart**, the valid range of settings is 0 to the total number of characters in the edit area of a **ComboBox** or **TextBox**.| - **Remarks** +## Remarks + The **SelLength** property is always valid, even when the control does not have[focus](../../Glossary/vbe-glossary.md). Setting **SelLength** to a value less than zero creates an error. Attempting to set **SelLength** to a value greater than the number of characters available in a control results in a value equal to the number of characters in the control. **Note** Changing the value of the **SelStart** property cancels any existing selection in the control, places an insertion point in the text, and sets **SelLength** to zero. diff --git a/Language/Reference/User-Interface-Help/selstart-property.md b/Language/Reference/User-Interface-Help/selstart-property.md index b76d12f4151..ec0af572b45 100644 --- a/Language/Reference/User-Interface-Help/selstart-property.md +++ b/Language/Reference/User-Interface-Help/selstart-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Indicates the starting point of selected text, or the insertion point if no text is selected. - **Syntax** - _object_. **SelStart** [= _Long_ ] + +## Syntax + +_object_. **SelStart** [= _Long_ ] The **SelStart** property syntax has these parts: @@ -26,7 +28,8 @@ The **SelStart** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. A numeric expression specifying the starting point of text selected. For **SelLength** and **SelStart**, the valid range of settings is 0 to the total number of characters in the edit area of a **ComboBox** or **TextBox**. The default value is zero.| - **Remarks** +## Remarks + The **SelStart** property is always valid, even when the control does not have[focus](../../Glossary/vbe-glossary.md). Setting **SelStart** to a value less than zero creates an error. Attempting to set **SelStart** to a value greater than the number of characters available in a control results in a value equal to the number of characters in the control. Changing the value of **SelStart** cancels any existing selection in the control, places an insertion point in the text, and sets the **SelLength** property to zero. diff --git a/Language/Reference/User-Interface-Help/seltext-property.md b/Language/Reference/User-Interface-Help/seltext-property.md index 8485d5bfd84..7f48ab2c815 100644 --- a/Language/Reference/User-Interface-Help/seltext-property.md +++ b/Language/Reference/User-Interface-Help/seltext-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns or sets the selected text of a control. - **Syntax** - _object_. **SelText** [= _String_ ] + +## Syntax + +_object_. **SelText** [= _String_ ] The **SelText** property syntax has these parts: @@ -26,6 +28,7 @@ The **SelText** property syntax has these parts: | _object_|Required. A valid object.| | _String_|Optional. A string expression containing the selected text.| - **Remarks** +## Remarks + If no characters are selected in the edit region of the control, the **SelText** property returns a zero length string. This property is valid regardless of whether the control has the[focus](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/sendkeys-statement.md b/Language/Reference/User-Interface-Help/sendkeys-statement.md index e331facee03..949ff55769c 100644 --- a/Language/Reference/User-Interface-Help/sendkeys-statement.md +++ b/Language/Reference/User-Interface-Help/sendkeys-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Sends one or more keystrokes to the active window as if typed at the keyboard. - **Syntax** +## Syntax - **SendKeys** **_string_** [, **_wait_** ] +**SendKeys** **_string_** [, **_wait_** ] The **SendKeys** statement syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,7 +25,8 @@ The **SendKeys** statement syntax has these[named arguments](../../Glossary/vbe |**_string_**|Required. [String expression](../../Glossary/vbe-glossary.md) specifying the keystrokes to send.| |**_Wait_**|Optional. [Boolean](../../Glossary/vbe-glossary.md) value specifying the wait mode. If **False** (default), control is returned to the[procedure](../../Glossary/vbe-glossary.md) immediately after the keys are sent. If **True**, keystrokes must be processed before control is returned to the procedure.| - **Remarks** +## Remarks + Each key is represented by one or more characters. To specify a single keyboard character, use the character itself. For example, to represent the letter A, use `"A"` for **_string_**. To represent more than one character, append each additional character to the one preceding it. To represent the letters A, B, and C, use `"ABC"` for **_string_**. The plus sign (**+**), caret (**^**), percent sign (**%**), tilde (**~**), and parentheses **( )** have special meanings to **SendKeys**. To specify one of these characters, enclose it within braces ( `{}`). For example, to specify the plus sign, use `{+}`. Brackets ([ ]) have no special meaning to **SendKeys**, but you must enclose them in braces. In other applications, brackets do have a special meaning that may be significant when[dynamic data exchange](../../Glossary/vbe-glossary.md) (DDE) occurs. To specify brace characters, use `{{}` and `{}}`. To specify characters that aren't displayed when you press a key, such as ENTER or TAB, and keys that represent actions rather than characters, use the codes shown below: diff --git a/Language/Reference/User-Interface-Help/serialnumber-property.md b/Language/Reference/User-Interface-Help/serialnumber-property.md index 55b8dbbbc21..a0ab31704d3 100644 --- a/Language/Reference/User-Interface-Help/serialnumber-property.md +++ b/Language/Reference/User-Interface-Help/serialnumber-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the decimal serial number used to uniquely identify a disk volume. - **Syntax** - _object_. **SerialNumber** + +## Syntax + +_object_. **SerialNumber** The _object_ is always a **Drive** object. - **Remarks** + +## Remarks + You can use the **SerialNumber** property to ensure that the correct disk is inserted in a drive with removable media. The following code illustrates the use of the **SerialNumber** property: diff --git a/Language/Reference/User-Interface-Help/set-statement.md b/Language/Reference/User-Interface-Help/set-statement.md index 91352f4617b..709b87dc427 100644 --- a/Language/Reference/User-Interface-Help/set-statement.md +++ b/Language/Reference/User-Interface-Help/set-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Assigns an object reference to a [variable](../../Glossary/vbe-glossary.md) or[property](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **Set**_objectvar_**=** {[ **New** ] _objectexpression_ |**Nothing** } +**Set**_objectvar_**=** {[ **New** ] _objectexpression_ |**Nothing** } The **Set** statement syntax has these parts: @@ -27,7 +27,8 @@ The **Set** statement syntax has these parts: | _objectexpression_|Required. [Expression](../../Glossary/vbe-glossary.md) consisting of the name of an object, another declared variable of the same[object type](../../Glossary/vbe-glossary.md), or a function or [method](../../Glossary/vbe-glossary.md) that returns an object of the same object type.| |**Nothing**|Optional. Discontinues association of _objectvar_ with any specific object. Assigning **Nothing** to _objectvar_ releases all the system and memory resources associated with the previously referenced object when no other variable refers to it.| - **Remarks** +## Remarks + To be valid, _objectvar_ must be an object type consistent with the object being assigned to it. The **Dim**, **Private**, **Public**, **ReDim**, and **Static** statements only declare a variable that refers to an object. No actual object is referred to until you use the **Set** statement to assign a specific object. The following example illustrates how **Dim** is used to declare an[array](../../Glossary/vbe-glossary.md) with the type `Form1`. No instance of `Form1` actually exists. **Set** then assigns references to new instances of `Form1` to the . No instance of `Form1` actually exists. **Set** then assigns references to new instances of `Form1` to the `myChildForms` variable. Such code might be used to create child forms in an MDI application. diff --git a/Language/Reference/User-Interface-Help/setattr-statement.md b/Language/Reference/User-Interface-Help/setattr-statement.md index d451682499a..e2fd3a147e7 100644 --- a/Language/Reference/User-Interface-Help/setattr-statement.md +++ b/Language/Reference/User-Interface-Help/setattr-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Sets attribute information for a file. - **Syntax** +## Syntax - **SetAttr** **_pathname_, _attributes_** +**SetAttr** **_pathname_, _attributes_** The **SetAttr** statement syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -40,7 +40,8 @@ The **_attributes_**[argument](../../Glossary/vbe-glossary.md) settings are: **Note** These constants are specified by Visual Basic for Applications. The names can be used anywhere in your code in place of the actual values. - **Remarks** +## Remarks + A [run-time error](../../Glossary/vbe-glossary.md) occurs if you try to set the attributes of an open file. ## Example diff --git a/Language/Reference/User-Interface-Help/setdefaulttaborder-method.md b/Language/Reference/User-Interface-Help/setdefaulttaborder-method.md index e7ba2e95ca2..75ce2f72d0a 100644 --- a/Language/Reference/User-Interface-Help/setdefaulttaborder-method.md +++ b/Language/Reference/User-Interface-Help/setdefaulttaborder-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Sets the **TabIndex** property of each control on a form, using a default top-to-bottom, left-to-right[tab order](../../Glossary/vbe-glossary.md). - **Syntax** - _object_. **SetDefaultTabOrder** + +## Syntax + +_object_. **SetDefaultTabOrder** The **SetDefaultTabOrder** method syntax has these parts: @@ -25,6 +27,7 @@ The **SetDefaultTabOrder** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + Microsoft Forms sets the tab order beginning with controls in the upper left corner of the form and moving to the right. It places controls closest to the left edge of the form earlier in the tab order. If more than one control is the same distance from the left edge of the form, tab order values are assigned from top to bottom. diff --git a/Language/Reference/User-Interface-Help/setfocus-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/setfocus-method-vba-add-in-object-model.md index fb6d53ab862..e5a9f393170 100644 --- a/Language/Reference/User-Interface-Help/setfocus-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/setfocus-method-vba-add-in-object-model.md @@ -14,9 +14,13 @@ ms.date: 06/08/2017 Moves the [focus](../../Glossary/vbe-glossary.md) to the specified window. - **Syntax** - _object_**.SetFocus** + +## Syntax + +_object_**.SetFocus** The _object_ placeholder is an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + Use the **SetFocus** method on windows that are already visible. diff --git a/Language/Reference/User-Interface-Help/setfocus-method.md b/Language/Reference/User-Interface-Help/setfocus-method.md index a1f43772f5c..1069c34e601 100644 --- a/Language/Reference/User-Interface-Help/setfocus-method.md +++ b/Language/Reference/User-Interface-Help/setfocus-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Moves the [focus](../../Glossary/vbe-glossary.md) to this instance of an object. - **Syntax** - _object_. **SetFocus** + +## Syntax + +_object_. **SetFocus** The **SetFocus** method syntax has these parts: @@ -25,7 +27,8 @@ The **SetFocus** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + If setting the focus fails, the focus reverts to the previous object and an error is generated. By default, setting the focus to a control does not activate the control's window or place it on top of other controls. The **SetFocus** method is valid for an empty **Frame** as well as a **Frame** that contains other controls. An empty **Frame** will take the focus itself, and any subsequent keyboard events apply to the **Frame**. In a **Frame** that contains other controls, the focus moves to the first control in the **Frame**, and subsequent keyboard events apply to the control that has the focus. diff --git a/Language/Reference/User-Interface-Help/setselection-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/setselection-method-vba-add-in-object-model.md index 47480a8a43c..7ff9d8e1b87 100644 --- a/Language/Reference/User-Interface-Help/setselection-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/setselection-method-vba-add-in-object-model.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Sets the selection in the [code pane](../../Glossary/vbe-glossary.md). - **Syntax** - _object_**.SetSelection(**_startline_, _startcol_, _endline_, _endcol_**)** + +## Syntax + +_object_**.SetSelection(**_startline_, _startcol_, _endline_, _endcol_**)** The **SetSelection** syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/settext-method.md b/Language/Reference/User-Interface-Help/settext-method.md index f91b9e8fe20..f349b29479e 100644 --- a/Language/Reference/User-Interface-Help/settext-method.md +++ b/Language/Reference/User-Interface-Help/settext-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Copies a text string to the **DataObject** using a specified[format](../../../language/Glossary/glossary-vba.md). - **Syntax** - _object_. **SetText(**_StoreData_ [, _format_ ] **)** + +## Syntax + +_object_. **SetText(**_StoreData_ [, _format_ ] **)** The **SetText** method syntax has these parts: @@ -36,7 +38,8 @@ The settings for _format_ are: |1|Text format.| |A string or integer value other than 1|A user-defined **DataObject** format.| - **Remarks** +## Remarks + The **DataObject** stores data according to its format. When the user supplies a string, the **DataObject** saves the text under the specified format. If the **DataObject** contains data in the same format as new data, the new data replaces the existing data in the **DataObject**. If the new data is in a new format, the new data and the new format are both added to the **DataObject**, and the previously existing data is there as well. If no format is specified, the **SetText** method assigns the Text format to the text string. If a new format is specified, the **DataObject** registers the new format with the system. diff --git a/Language/Reference/User-Interface-Help/sgn-function.md b/Language/Reference/User-Interface-Help/sgn-function.md index af99ed38ce4..51457ec60fb 100644 --- a/Language/Reference/User-Interface-Help/sgn-function.md +++ b/Language/Reference/User-Interface-Help/sgn-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Integer**) indicating the sign of a number. - **Syntax** - **Sgn(**_number_**)** + +## Syntax + +**Sgn(**_number_**)** The required _number_[argument](../../Glossary/vbe-glossary.md) can be any valid[numeric expression](../../Glossary/vbe-glossary.md). **Return Values** @@ -26,7 +28,8 @@ The required _number_[argument](../../Glossary/vbe-glossary.md) can be any vali |Equal to zero|0| |Less than zero|-1| - **Remarks** +## Remarks + The sign of the _number_ argument determines the return value of the **Sgn** function. ## Example diff --git a/Language/Reference/User-Interface-Help/sharename-property.md b/Language/Reference/User-Interface-Help/sharename-property.md index defae992a2a..23851e2164c 100644 --- a/Language/Reference/User-Interface-Help/sharename-property.md +++ b/Language/Reference/User-Interface-Help/sharename-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the network share name for a specified drive. - **Syntax** - _object_. **ShareName** + +## Syntax + +_object_. **ShareName** The _object_ is always a **Drive** object. - **Remarks** + +## Remarks + If _object_ is not a network drive, the **ShareName** property returns a zero-length string (""). The following code illustrates the use of the **ShareName** property: diff --git a/Language/Reference/User-Interface-Help/shell-function.md b/Language/Reference/User-Interface-Help/shell-function.md index 949ea3be22b..02b83e688cb 100644 --- a/Language/Reference/User-Interface-Help/shell-function.md +++ b/Language/Reference/User-Interface-Help/shell-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Runs an executable program and returns a **Variant** (**Double**) representing the program's task ID if successful, otherwise it returns zero. - **Syntax** - **Shell( _pathname_** [ **, _windowstyle_** ] **)** + +## Syntax + +**Shell( _pathname_** [ **, _windowstyle_** ] **)** The **Shell** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -36,7 +38,8 @@ The **_windowstyle_** named argument has these values: |**vbNormalNoFocus**|4|Window is restored to its most recent size and position. The currently active window remains active.| |**vbMinimizedNoFocus**|6|Window is displayed as an icon. The currently active window remains active.| - **Remarks** +## Remarks + If the **Shell** function successfully executes the named file, it returns the task ID of the started program. The task ID is a unique number that identifies the running program. If the **Shell** function can't start the named program, an error occurs. On the Macintosh, **vbNormalFocus**, **vbMinimizedFocus**, and **vbMaximizedFocus** all place the application in the foreground; **vbHide**, **vbNoFocus**, **vbMinimizeFocus** all place the application in the background. diff --git a/Language/Reference/User-Interface-Help/shortname-property.md b/Language/Reference/User-Interface-Help/shortname-property.md index 2520554a91f..ad3c26161be 100644 --- a/Language/Reference/User-Interface-Help/shortname-property.md +++ b/Language/Reference/User-Interface-Help/shortname-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the short name used by programs that require the earlier 8.3 naming convention. - **Syntax** - _object_. **ShortName** + +## Syntax + +_object_. **ShortName** The _object_ is always a **File** or **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **ShortName** property with a **File** object: diff --git a/Language/Reference/User-Interface-Help/shortpath-property.md b/Language/Reference/User-Interface-Help/shortpath-property.md index 919e4c66c79..3770159efde 100644 --- a/Language/Reference/User-Interface-Help/shortpath-property.md +++ b/Language/Reference/User-Interface-Help/shortpath-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the short path used by programs that require the earlier 8.3 file naming convention. - **Syntax** - _object_. **ShortPath** + +## Syntax + +_object_. **ShortPath** The _object_ is always a **File** or **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **ShortName** property with a **File** object: diff --git a/Language/Reference/User-Interface-Help/show-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/show-method-vba-add-in-object-model.md index 8af4bc172de..e5139087b56 100644 --- a/Language/Reference/User-Interface-Help/show-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/show-method-vba-add-in-object-model.md @@ -14,9 +14,13 @@ ms.date: 06/08/2017 Makes the specified [code pane](../../Glossary/vbe-glossary.md) the visible code pane in its window. - **Syntax** - _object_**.Show** + +## Syntax + +_object_**.Show** The _object_ placeholder is an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + The **Show** method makes the specified code pane the pane with the[focus](../../Glossary/vbe-glossary.md) in its window. diff --git a/Language/Reference/User-Interface-Help/show-method.md b/Language/Reference/User-Interface-Help/show-method.md index 633b41d76e6..bd95c5ddbb2 100644 --- a/Language/Reference/User-Interface-Help/show-method.md +++ b/Language/Reference/User-Interface-Help/show-method.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Displays a **UserForm** object. - **Syntax** + +## Syntax + [ _object_**.** ] **Show**_modal_ The **Show** method syntax has these parts: @@ -35,7 +37,8 @@ The settings for _modal_ are: |**vbModal**|1|**UserForm** is modal. Default.| |**vbModeless**|0|**UserForm** is modeless.| - **Remarks** +## Remarks + If the specified object isn't loaded when the **Show** method is invoked, Visual Basic automatically loads it. **Note** In Microsoft Office 97, if a **UserForm** is set to display as modeless, it causes a run-time error; Office 97 **UserForms** are always modal. diff --git a/Language/Reference/User-Interface-Help/showdropbuttonwhen-property.md b/Language/Reference/User-Interface-Help/showdropbuttonwhen-property.md index 591c4bff903..1fd885f8b73 100644 --- a/Language/Reference/User-Interface-Help/showdropbuttonwhen-property.md +++ b/Language/Reference/User-Interface-Help/showdropbuttonwhen-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies when to show the drop-down button for a **ComboBox** or **TextBox**. - **Syntax** - _object_. **ShowDropButtonWhen** [= _fmShowDropButtonWhen_ ] + +## Syntax + +_object_. **ShowDropButtonWhen** [= _fmShowDropButtonWhen_ ] The **ShowDropButtonWhen** property syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/showmodal-property.md b/Language/Reference/User-Interface-Help/showmodal-property.md index 24f4f8235c6..a9d37078e7a 100644 --- a/Language/Reference/User-Interface-Help/showmodal-property.md +++ b/Language/Reference/User-Interface-Help/showmodal-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Sets a **UserForm** to be modal or modeless in its display. Read-only at[run time](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + The settings for the **ShowModal** property are: @@ -25,7 +27,9 @@ The settings for the **ShowModal** property are: |**True**|(Default) The **UserForm** is modal.| |**False**|The **UserForm** is modeless.| - **Remarks** + +## Remarks + When a **UserForm** is modal, the user must supply information or close the **UserForm** before using any other part of the application. No subsequent code is executed until the **UserForm** is hidden or unloaded. Although other forms in the application are disabled when a **UserForm** is displayed, other applications are not. When the **UserForm** is modeless, the user can view other forms or windows without closing the **UserForm**. Modeless forms do not appear in the task bar and are not in the window tab order. diff --git a/Language/Reference/User-Interface-Help/sin-function.md b/Language/Reference/User-Interface-Help/sin-function.md index 0a290f32d84..c79795a8659 100644 --- a/Language/Reference/User-Interface-Help/sin-function.md +++ b/Language/Reference/User-Interface-Help/sin-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Double** specifying the sine of an angle. - **Syntax** - **Sin(**_number_**)** + +## Syntax + +**Sin(**_number_**)** The required _number_[argument](../../Glossary/vbe-glossary.md) is a[Double](../../Glossary/vbe-glossary.md) or any valid[numeric expression](../../Glossary/vbe-glossary.md) that expresses an angle in radians. - **Remarks** + +## Remarks + The **Sin** function takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the hypotenuse. The result lies in the range -1 to 1. To convert degrees to radians, multiply degrees by [pi](../../Glossary/vbe-glossary.md)/180. To convert radians to degrees, multiply radians by 180/pi. diff --git a/Language/Reference/User-Interface-Help/size-property-filesystemobject-object.md b/Language/Reference/User-Interface-Help/size-property-filesystemobject-object.md index 48aa4bd2302..ed2db12759e 100644 --- a/Language/Reference/User-Interface-Help/size-property-filesystemobject-object.md +++ b/Language/Reference/User-Interface-Help/size-property-filesystemobject-object.md @@ -15,10 +15,14 @@ ms.date: 06/08/2017 **Description** For files, returns the size, in bytes, of the specified file. For folders, returns the size, in bytes, of all files and subfolders contained in the folder. - **Syntax** - _object_. **Size** + +## Syntax + +_object_. **Size** The _object_ is always a **File** or **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **Size** property with a **Folder** object: diff --git a/Language/Reference/User-Interface-Help/skip-method.md b/Language/Reference/User-Interface-Help/skip-method.md index 0ff1e8d3a70..357a57435cf 100644 --- a/Language/Reference/User-Interface-Help/skip-method.md +++ b/Language/Reference/User-Interface-Help/skip-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Skips a specified number of characters when reading a **TextStream** file. - **Syntax** - _object_. **Skip(**_characters_**)** + +## Syntax + +_object_. **Skip(**_characters_**)** The **Skip** method syntax has these parts: @@ -27,6 +29,7 @@ The **Skip** method syntax has these parts: | _object_|Required. Always the name of a **TextStream** object.| | _characters_|Required. Number of characters to skip when reading a file.| - **Remarks** +## Remarks + Skipped characters are discarded. diff --git a/Language/Reference/User-Interface-Help/skipline-method.md b/Language/Reference/User-Interface-Help/skipline-method.md index a371a79647a..7e338751aa0 100644 --- a/Language/Reference/User-Interface-Help/skipline-method.md +++ b/Language/Reference/User-Interface-Help/skipline-method.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Skips the next line when reading a **TextStream** file. - **Syntax** - _object_. **SkipLine** + +## Syntax + +_object_. **SkipLine** The _object_ is always the name of a **TextStream** object. - **Remarks** + +## Remarks + Skipping a line means reading and discarding all characters in a line up to and including the next newline character. An error occurs if the file is not open for reading. diff --git a/Language/Reference/User-Interface-Help/sln-function.md b/Language/Reference/User-Interface-Help/sln-function.md index ca4ca394c7f..46917aaf347 100644 --- a/Language/Reference/User-Interface-Help/sln-function.md +++ b/Language/Reference/User-Interface-Help/sln-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the straight-line depreciation of an asset for a single period. - **Syntax** - **SLN( _cost_**, **_salvage_**, **_life_ )** + +## Syntax + +**SLN( _cost_**, **_salvage_**, **_life_ )** The **SLN** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,7 +27,8 @@ The **SLN** function has these[named arguments](../../Glossary/vbe-glossary.md) |**_salvage_**|Required. **Double** specifying value of the asset at the end of its useful life.| |**_life_**|Required. **Double** specifying length of the useful life of the asset.| - **Remarks** +## Remarks + The depreciation period must be expressed in the same unit as the **_life_**[argument](../../Glossary/vbe-glossary.md). All arguments must be positive numbers. ## Example diff --git a/Language/Reference/User-Interface-Help/smallchange-property.md b/Language/Reference/User-Interface-Help/smallchange-property.md index fa2166e5fa7..3f38fb8634a 100644 --- a/Language/Reference/User-Interface-Help/smallchange-property.md +++ b/Language/Reference/User-Interface-Help/smallchange-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the amount of movement that occurs when the user clicks either scroll arrow in a **ScrollBar** or **SpinButton**. - **Syntax** - _object_. **SmallChange** [= _Long_ ] + +## Syntax + +_object_. **SmallChange** [= _Long_ ] The **SmallChange** property syntax has these parts: @@ -26,7 +28,8 @@ The **SmallChange** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. An integer that specifies the amount of change to the **Value** property.| - **Remarks** +## Remarks + The **SmallChange** property does not have units. Any integer is an acceptable setting for this property. The recommended range of values is from -32,767 to +32,767. The default value is 1. diff --git a/Language/Reference/User-Interface-Help/source-property-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/source-property-visual-basic-for-applications.md index 13da28d1fa4..3cb7f650a00 100644 --- a/Language/Reference/User-Interface-Help/source-property-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/source-property-visual-basic-for-applications.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a [string expression](../../Glossary/vbe-glossary.md) specifying the name of the object or application that originally generated the error. Read/write. - **Remarks** + +## Remarks + The **Source**[property](../../Glossary/vbe-glossary.md) specifies a string expression representing the object that generated the error; the[expression](../../Glossary/vbe-glossary.md) is usually the object's[class](../../Glossary/vbe-glossary.md) name or programmatic ID. Use **Source** to provide information when your code is unable to handle an error generated in an accessed object. For example, if you access Microsoft Excel and it generates a `Division by zero` error, Microsoft Excel sets **Err.Number** to its error code for that error and sets **Source** to `Excel.Application`. When generating an error from code, **Source** is your application's programmatic ID. For[class modules](../../Glossary/vbe-glossary.md), **Source** should contain a name having the form _project.class_. When an unexpected error occurs in your code, the **Source** property is automatically filled in. For errors in a[standard module](../../Glossary/vbe-glossary.md), **Source** contains the[project](../../Glossary/vbe-glossary.md) name. For errors in a class module, **Source** contains a name with the _project.class_ form. diff --git a/Language/Reference/User-Interface-Help/space-function.md b/Language/Reference/User-Interface-Help/space-function.md index 9086e530309..403d0d75c9f 100644 --- a/Language/Reference/User-Interface-Help/space-function.md +++ b/Language/Reference/User-Interface-Help/space-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) consisting of the specified number of spaces. - **Syntax** - **Space** ( _number_ ) + +## Syntax + +**Space** ( _number_ ) The required _number_[argument](../../Glossary/vbe-glossary.md) is the number of spaces you want in the string. - **Remarks** + +## Remarks + The **Space** function is useful for formatting output and clearing data in fixed-length strings. ## Example diff --git a/Language/Reference/User-Interface-Help/spc-function.md b/Language/Reference/User-Interface-Help/spc-function.md index 892c845a4c6..055686655c0 100644 --- a/Language/Reference/User-Interface-Help/spc-function.md +++ b/Language/Reference/User-Interface-Help/spc-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Used with the **Print #** statement or the **Print** method to position output. - **Syntax** - **Spc(**_n_**)** + +## Syntax + +**Spc(**_n_**)** The required _n_[argument](../../Glossary/vbe-glossary.md) is the number of spaces to insert before displaying or printing the next[expression](../../Glossary/vbe-glossary.md) in a list. - **Remarks** + +## Remarks + If _n_ is less than the output line width, the next print position immediately follows the number of spaces printed. If _n_ is greater than the output line width, **Spc** calculates the next print position using the formula: _currentprintposition +_ ( _n_**Mod**_width_ ) For example, if the current print position is 24, the output line width is 80, and you specify **Spc(** 90 **)**, the next print will start at position 34 (current print position + the remainder of 90/80). If the difference between the current print position and the output line width is less than _n_ (or _n_**Mod**_width_ ), the **Spc** function skips to the beginning of the next line and generates spaces equal to _n_ - ( _width_ - _currentprintposition_ ). diff --git a/Language/Reference/User-Interface-Help/specialeffect-property.md b/Language/Reference/User-Interface-Help/specialeffect-property.md index eefd618749c..b1d83123e69 100644 --- a/Language/Reference/User-Interface-Help/specialeffect-property.md +++ b/Language/Reference/User-Interface-Help/specialeffect-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Specifies the visual appearance of an object. - **Syntax** + +## Syntax + For CheckBox, OptionButton, ToggleButton _object_. **SpecialEffect** [= _fmButtonEffect_ ] For other controls _object_. **SpecialEffect** [= _fmSpecialEffect_ ] The **SpecialEffect** property syntax has these parts: @@ -42,7 +44,9 @@ The settings for _fmSpecialEffect_ are: For a **Frame**, the default value is _Sunken_. Note that only _Flat_ and _Sunken_ (0 and 2) are acceptable values for **CheckBox**, **OptionButton**, and **ToggleButton**. All values listed are acceptable for other controls. - **Remarks** + +## Remarks + You can use either the **SpecialEffect** or the **BorderStyle** property to specify the edging for a control, but not both. If you specify a nonzero value for one of these properties, the system sets the value of the other property to zero. For example, if you set **SpecialEffect** to **fmSpecialEffectRaised**, the system sets **BorderStyle** to zero (**fmBorderStyleNone**). For a **Frame**, **BorderStyle** is ignored if **SpecialEffect** is **fmSpecialEffectFlat**. **SpecialEffect** uses the[system colors](../../../language/Glossary/glossary-vba.md) to define its borders. diff --git a/Language/Reference/User-Interface-Help/spinbutton-control.md b/Language/Reference/User-Interface-Help/spinbutton-control.md index 96a96f7ca9d..7be377c2e33 100644 --- a/Language/Reference/User-Interface-Help/spinbutton-control.md +++ b/Language/Reference/User-Interface-Help/spinbutton-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Increments and decrements numbers. - **Remarks** + +## Remarks + Clicking a **SpinButton** changes only the value of the **SpinButton**. You can write code that uses the **SpinButton** to update the displayed value of another control. For example, you can use a **SpinButton** to change the month, the day, or the year shown on a date. You can also use a **SpinButton** to scroll through a range of values or a list of items, or to change the value displayed in a text box. To display a value updated by a **SpinButton**, you must assign the value of the **SpinButton** to the displayed portion of a control, such as the **Caption** property of a **Label** or the **Text** property of a **TextBox**. To create a horizontal or vertical **SpinButton**, drag the sizing handles of the **SpinButton** horizontally or vertically on the form. The default property for a **SpinButton** is the **Value** property. diff --git a/Language/Reference/User-Interface-Help/spindown-spinup-events.md b/Language/Reference/User-Interface-Help/spindown-spinup-events.md index 09e1b1ac0d1..dbf4b18bb4c 100644 --- a/Language/Reference/User-Interface-Help/spindown-spinup-events.md +++ b/Language/Reference/User-Interface-Help/spindown-spinup-events.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 SpinDown occurs when the user clicks the lower or left spin-button arrow. SpinUp occurs when the user clicks the upper or right spin-button arrow. - **Syntax** - **Private Sub**_object_ _**SpinDown( )** + +## Syntax + +**Private Sub**_object_ _**SpinDown( )** **Private Sub**_object_ _**SpinUp( )** The **SpinDown** and **SpinUp** event syntaxes have these parts: @@ -24,6 +26,7 @@ The **SpinDown** and **SpinUp** event syntaxes have these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The SpinDown event decreases the **Value** property. The SpinUp event increases **Value**. diff --git a/Language/Reference/User-Interface-Help/split-function.md b/Language/Reference/User-Interface-Help/split-function.md index 20674da9c6d..cc718c33161 100644 --- a/Language/Reference/User-Interface-Help/split-function.md +++ b/Language/Reference/User-Interface-Help/split-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns a zero-based, one-dimensional [array](../../Glossary/vbe-glossary.md) containing a specified number of substrings. - **Syntax** - **Split( _expression_** [ **,** **_delimiter_** [ **,** **_limit_** [ **,** **_compare_** ]]] **)** + +## Syntax + +**Split( _expression_** [ **,** **_delimiter_** [ **,** **_limit_** [ **,** **_compare_** ]]] **)** The **Split** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): diff --git a/Language/Reference/User-Interface-Help/sqr-function.md b/Language/Reference/User-Interface-Help/sqr-function.md index e6f2073c4a2..39382ae86cd 100644 --- a/Language/Reference/User-Interface-Help/sqr-function.md +++ b/Language/Reference/User-Interface-Help/sqr-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Double** specifying the square root of a number. - **Syntax** - **Sqr(**_number_**)** + +## Syntax + +**Sqr(**_number_**)** The required _number_[argument](../../Glossary/vbe-glossary.md) is a[Double](../../Glossary/vbe-glossary.md) or any valid[numeric expression](../../Glossary/vbe-glossary.md) greater than or equal to zero. ## Example diff --git a/Language/Reference/User-Interface-Help/startdrag-method.md b/Language/Reference/User-Interface-Help/startdrag-method.md index 48874065b4b..0c8fa96f3a9 100644 --- a/Language/Reference/User-Interface-Help/startdrag-method.md +++ b/Language/Reference/User-Interface-Help/startdrag-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Initiates a drag-and-drop operation for a **DataObject**. - **Syntax** - _fmDropEffect=Object_. **StartDrag _(_**_[Effect as fmDropEffect])_ + +## Syntax + +_fmDropEffect=Object_. **StartDrag _(_**_[Effect as fmDropEffect])_ The **StartDrag** method syntax has these parts: @@ -37,7 +39,8 @@ The settings for _Effect_ are: | _fmDropEffectMove_|2|Moves the drop source to the drop target.| | _fmDropEffectCopyOrMove_|3|Copies or moves the drop source to the drop target.| - **Remarks** +## Remarks + The drag action starts at the current mouse pointer position with the current [keyboard state](../../../language/Glossary/glossary-vba.md) and ends when the user releases the mouse. The effect of the drag-and-drop operation depends on the effect chosen for the drop target. For example, a control's MouseMove event might include the **StartDrag** method. When the user clicks the control and moves the mouse, the mouse pointer changes to indicate whether _Effect_ is valid for the drop target. diff --git a/Language/Reference/User-Interface-Help/startupposition-property.md b/Language/Reference/User-Interface-Help/startupposition-property.md index 3cda44bf15b..e1fd3760d6b 100644 --- a/Language/Reference/User-Interface-Help/startupposition-property.md +++ b/Language/Reference/User-Interface-Help/startupposition-property.md @@ -26,7 +26,8 @@ You can use one of four settings for **StartUpPosition**: |**CenterScreen**|2|Center on the whole screen.| |**WindowsDefault**|3|Position in upper-left corner of screen.| - **Remarks** +## Remarks + You can set the **StartUpPosition** property programmatically or from the **Properties** window. ## Example diff --git a/Language/Reference/User-Interface-Help/static-statement.md b/Language/Reference/User-Interface-Help/static-statement.md index 50e35db2037..35140a721a7 100644 --- a/Language/Reference/User-Interface-Help/static-statement.md +++ b/Language/Reference/User-Interface-Help/static-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Used at [procedure level](../../Glossary/vbe-glossary.md) to declare [variables](../../Glossary/vbe-glossary.md) and allocate storage space. Variables declared with the **Static** statement retain their values as long as the code is running. - **Syntax** +## Syntax - **Static** _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ] [ **,** _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ]] **. . .** +**Static** _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ] [ **,** _varname_ [ **(** [ _subscripts_ ] **)** ] [ **As** [ **New** ] _type_ ]] **. . .** The **Static** statement syntax has these parts: @@ -27,7 +27,8 @@ The **Static** statement syntax has these parts: |**New**|Optional. [Keyword](../../Glossary/vbe-glossary.md) that enables implicit creation of an object. If you use **New** when declaring the [object variable](../../Glossary/vbe-glossary.md), a new instance of the object is created on first reference to it, so you don't have to use the **Set** statement to assign the object reference. The **New** keyword can't be used to declare variables of any intrinsic [data type](../../Glossary/vbe-glossary.md) and can't be used to declare instances of dependent objects.| | _type_|Optional. Data type of the variable; may be [Byte](../../Glossary/vbe-glossary.md), [Boolean](../../Glossary/vbe-glossary.md), [Integer](../../Glossary/vbe-glossary.md), [Long](../../Glossary/vbe-glossary.md), [Currency](../../Glossary/vbe-glossary.md), [Single](../../Glossary/vbe-glossary.md), [Double](../../Glossary/vbe-glossary.md), [Decimal](../../Glossary/vbe-glossary.md) (not currently supported), [Date](../../Glossary/vbe-glossary.md), [String](../../Glossary/vbe-glossary.md), (for variable-length strings), **String** * _length_ (for fixed-length strings), [Object](../../Glossary/vbe-glossary.md), [Variant](../../Glossary/vbe-glossary.md), a [user-defined type](../../Glossary/vbe-glossary.md), or an [object type](../../Glossary/vbe-glossary.md). Use a separate **As** _type_ clause for each variable being defined.| - **Remarks** +## Remarks + Once [module](../../Glossary/vbe-glossary.md) code is running, variables declared with the **Static** [statement](../../Glossary/vbe-glossary.md) retain their value until the module is reset or restarted. In [class modules](../../Glossary/vbe-glossary.md), variables declared with the **Static** statement retain their value in each class instance until that instance is destroyed. In [form modules](../../Glossary/vbe-glossary.md), static variables retain their value until the form is closed. Use the **Static** statement in nonstatic [procedure](../../Glossary/vbe-glossary.md)s to explicitly declare variables that are visible only within the procedure, but whose lifetime is the same as the module in which the procedure is defined. Use a **Static** statement within a procedure to declare the data type of a variable that retains its value between procedure calls. For example, the following statement declares a fixed-size array of integers: diff --git a/Language/Reference/User-Interface-Help/stop-statement.md b/Language/Reference/User-Interface-Help/stop-statement.md index 8347c315f89..aceb1dca5cf 100644 --- a/Language/Reference/User-Interface-Help/stop-statement.md +++ b/Language/Reference/User-Interface-Help/stop-statement.md @@ -13,11 +13,12 @@ ms.date: 06/08/2017 Suspends execution. - **Syntax** +## Syntax - **Stop** +**Stop** + +## Remarks - **Remarks** You can place **Stop** statements anywhere in[procedures](../../Glossary/vbe-glossary.md) to suspend execution. Using the **Stop** statement is similar to setting a[breakpoint](../../Glossary/vbe-glossary.md) in the code. The **Stop** statement suspends execution, but unlike **End**, it doesn't close any files or clear[variables](../../Glossary/vbe-glossary.md), unless it is in a compiled executable (.exe) file. diff --git a/Language/Reference/User-Interface-Help/str-function.md b/Language/Reference/User-Interface-Help/str-function.md index f8ee81dc6b7..3e0b57cc382 100644 --- a/Language/Reference/User-Interface-Help/str-function.md +++ b/Language/Reference/User-Interface-Help/str-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) representation of a number. - **Syntax** - **Str** ( _number_ ) + +## Syntax + +**Str** ( _number_ ) The required _number_[argument](../../Glossary/vbe-glossary.md) is a[Long](../../Glossary/vbe-glossary.md) containing any valid[numeric expression](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + When numbers are converted to strings, a leading space is always reserved for the sign of _number_. If _number_ is positive, the returned string contains a leading space and the plus sign is implied. Use the **Format** function to convert numeric values you want formatted as dates, times, or currency or in other user-defined formats. Unlike **Str**, the **Format** function doesn't include a leading space for the sign of _number_. diff --git a/Language/Reference/User-Interface-Help/strcomp-function.md b/Language/Reference/User-Interface-Help/strcomp-function.md index eb65d435c5c..337b591edcc 100644 --- a/Language/Reference/User-Interface-Help/strcomp-function.md +++ b/Language/Reference/User-Interface-Help/strcomp-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Integer**) indicating the result of a[string comparison](../../Glossary/vbe-glossary.md). - **Syntax** - **StrComp** (**_string1_**, **_string2_** [, **_compare_** ]) + +## Syntax + +**StrComp** (**_string1_**, **_string2_** [, **_compare_** ]) The **StrComp** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): diff --git a/Language/Reference/User-Interface-Help/strconv-function.md b/Language/Reference/User-Interface-Help/strconv-function.md index 9038dc5d56c..ce6c21493f8 100644 --- a/Language/Reference/User-Interface-Help/strconv-function.md +++ b/Language/Reference/User-Interface-Help/strconv-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) converted as specified. - **Syntax** - **StrConv** (**_string, conversion, LCID_**) + +## Syntax + +**StrConv** (**_string, conversion, LCID_**) The **StrConv** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -47,7 +49,9 @@ The **_conversion_**[argument](../../Glossary/vbe-glossary.md) settings are: **Note** These [constants](../../Glossary/vbe-glossary.md) are specified by Visual Basic for Applications. As a result, they may be used anywhere in your code in place of the actual values. Most can be combined, for example, **vbUpperCase + vbWide**, except when they are mutually exclusive, for example, **vbUnicode + vbFromUnicode**. The constants **vbWide**, **vbNarrow**, **vbKatakana**, and **vbHiragana** cause[run-time errors](../../Glossary/vbe-glossary.md) when used in[locales](../../Glossary/vbe-glossary.md) where they do not apply. The following are valid word separators for proper casing: [Null](../../Glossary/vbe-glossary.md) (**Chr$(** 0 **)**), horizontal tab (**Chr$(** 9 **)**), linefeed (**Chr$(** 10 **)**), vertical tab (**Chr$(** 11 **)**), form feed (**Chr$(** 12 **)**), carriage return (**Chr$(** 13 **)**), space (SBCS) (**Chr$(** 32 **)**). The actual value for a space varies by country/region for[DBCS](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + When converting from a **Byte** array in ANSI format to a string, use the **StrConv** function. When converting from such an array in Unicode format, use an assignment statement. ## Example diff --git a/Language/Reference/User-Interface-Help/string-function.md b/Language/Reference/User-Interface-Help/string-function.md index eedd39e50c7..3dd7a37deb6 100644 --- a/Language/Reference/User-Interface-Help/string-function.md +++ b/Language/Reference/User-Interface-Help/string-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) containing a repeating character string of the length specified. - **Syntax** - **String** (**_number_**, **_character_**) + +## Syntax + +**String** (**_number_**, **_character_**) The **String** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -24,7 +26,8 @@ The **String** function syntax has these[named arguments](../../Glossary/vbe-gl |**_number_**|Required; [Long](../../Glossary/vbe-glossary.md). Length of the returned string. If **_number_** contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned.| |**_character_**|Required; [Variant](../../Glossary/vbe-glossary.md). [Character code](../../Glossary/vbe-glossary.md) specifying the character or[string expression](../../Glossary/vbe-glossary.md) whose first character is used to build the return string. If **_character_** contains **Null**, **Null** is returned.| - **Remarks** +## Remarks + If you specify a number for **_character_** greater than 255, **String** converts the number to a valid character code using the formula: **_character_** **Mod** 256 diff --git a/Language/Reference/User-Interface-Help/strreverse-function.md b/Language/Reference/User-Interface-Help/strreverse-function.md index ee80a9c8775..41a52bd4c96 100644 --- a/Language/Reference/User-Interface-Help/strreverse-function.md +++ b/Language/Reference/User-Interface-Help/strreverse-function.md @@ -15,7 +15,9 @@ ms.date: 06/08/2017 **Description** Returns a string in which the character order of a specified string is reversed. - **Syntax** - **StrReverse( _expression_ )** + +## Syntax + +**StrReverse( _expression_ )** The **_expression_** argument is the string whose characters are to be reversed. If **_expression_** is a zero-length string (""), a zero-length string is returned. If **_expression_** is **Null**, an error occurs. diff --git a/Language/Reference/User-Interface-Help/style-property.md b/Language/Reference/User-Interface-Help/style-property.md index 376fd13d16c..679d53c1127 100644 --- a/Language/Reference/User-Interface-Help/style-property.md +++ b/Language/Reference/User-Interface-Help/style-property.md @@ -13,7 +13,9 @@ ms.date: 06/08/2017 For **ComboBox**, specifies how the user can choose or set the control's value. For **MultiPage** and **TabStrip**, identifies the style of the tabs on the control. - **Syntax** + +## Syntax + For ComboBox _object_. **Style** [= _fmStyle_ ] For MultiPage and TabStrip _object_. **Style** [= _fmTabStyle_ ] The **Style** property syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/sub-statement.md b/Language/Reference/User-Interface-Help/sub-statement.md index 4dfbc25fac2..78c6ad4f004 100644 --- a/Language/Reference/User-Interface-Help/sub-statement.md +++ b/Language/Reference/User-Interface-Help/sub-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Declares the name, [arguments](../../Glossary/vbe-glossary.md), and code that form the body of a **Sub** [procedure](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax [ **Private** |**Public** |**Friend** ] [ **Static** ] **Sub** _name_ [ **(**_arglist_**)** ] [ _statements_ ] @@ -48,7 +48,7 @@ The _arglist_ argument has the following syntax and parts: | _type_|Optional. [Data type](../../Glossary/vbe-glossary.md) of the argument passed to the procedure; may be[Byte](../../Glossary/vbe-glossary.md), [Boolean](../../Glossary/vbe-glossary.md), [Integer](../../Glossary/vbe-glossary.md), [Long](../../Glossary/vbe-glossary.md), [Currency](../../Glossary/vbe-glossary.md), [Single](../../Glossary/vbe-glossary.md), [Double](../../Glossary/vbe-glossary.md), [Decimal](../../Glossary/vbe-glossary.md) (not currently supported), [Date](../../Glossary/vbe-glossary.md), [String](../../Glossary/vbe-glossary.md) (variable-length only), [Object](../../Glossary/vbe-glossary.md), [Variant](../../Glossary/vbe-glossary.md), or a specific [object type](../../Glossary/vbe-glossary.md). If the parameter is not **Optional**, a [user-defined type](../../Glossary/vbe-glossary.md) may also be specified.| | _defaultvalue_|Optional. Any [constant](../../Glossary/vbe-glossary.md) or constant [expression](../../Glossary/vbe-glossary.md). Valid for **Optional** parameters only. If the type is an **Object**, an explicit default value can only be **Nothing**.| -**Remarks** +## Remarks If not explicitly specified using **Public**, **Private**, or **Friend**, **Sub** procedures are public by default. diff --git a/Language/Reference/User-Interface-Help/subfolders-property.md b/Language/Reference/User-Interface-Help/subfolders-property.md index 261dd413994..9afb6371af5 100644 --- a/Language/Reference/User-Interface-Help/subfolders-property.md +++ b/Language/Reference/User-Interface-Help/subfolders-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns a **Folders** collection consisting of all folders contained in a specified folder, including those with Hidden and System file attributes set. - **Syntax** - _object_. **SubFolders** + +## Syntax + +_object_. **SubFolders** The _object_ is always a **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **SubFolders** property: diff --git a/Language/Reference/User-Interface-Help/switch-function.md b/Language/Reference/User-Interface-Help/switch-function.md index f191bb84add..037baf9a98f 100644 --- a/Language/Reference/User-Interface-Help/switch-function.md +++ b/Language/Reference/User-Interface-Help/switch-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Evaluates a list of [expressions](../../Glossary/vbe-glossary.md) and returns a **Variant** value or an expression associated with the first expression in the list that is **True**. - **Syntax** - **Switch(**_expr-1_**,**_value-1_ [ **,**_expr-2_**,**_value-2_**…** [ **,**_expr-n_**,**_value-n_ ]] **)** + +## Syntax + +**Switch(**_expr-1_**,**_value-1_ [ **,**_expr-2_**,**_value-2_**…** [ **,**_expr-n_**,**_value-n_ ]] **)** The **Switch** function syntax has these parts: @@ -24,7 +26,8 @@ The **Switch** function syntax has these parts: | _expr_|Required. [Variant expression](../../Glossary/vbe-glossary.md) you want to evaluate.| | _value_|Required. Value or expression to be returned if the corresponding expression is **True**.| - **Remarks** +## Remarks + The **Switch** function[argument](../../Glossary/vbe-glossary.md) list consists of pairs of expressions and values. The expressions are evaluated from left to right, and the value associated with the first expression to evaluate to **True** is returned. If the parts aren't properly paired, a[run-time error](../../Glossary/vbe-glossary.md) occurs. For example, if _expr-1_ is **True**, **Switch** returns _value-1_. If _expr-1_ is **False**, but _expr-2_ is **True**, **Switch** returns _value-2_, and so on. **Switch** returns a[Null](../../Glossary/vbe-glossary.md) value if: diff --git a/Language/Reference/User-Interface-Help/syd-function.md b/Language/Reference/User-Interface-Help/syd-function.md index b4b88b315ec..2fe85a54920 100644 --- a/Language/Reference/User-Interface-Help/syd-function.md +++ b/Language/Reference/User-Interface-Help/syd-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Double](../../Glossary/vbe-glossary.md) specifying the sum-of-years' digits depreciation of an asset for a specified period. - **Syntax** - **SYD( _cost_**, **_salvage_**, **_life_**, **_period_ )** + +## Syntax + +**SYD( _cost_**, **_salvage_**, **_life_**, **_period_ )** The **SYD** function has these[named arguments](../../Glossary/vbe-glossary.md): @@ -26,7 +28,8 @@ The **SYD** function has these[named arguments](../../Glossary/vbe-glossary.md) |**_life_**|Required. **Double** specifying length of the useful life of the asset.| |**_period_**|Required. **Double** specifying period for which asset depreciation is calculated.| - **Remarks** +## Remarks + The **_life_** and **_period_**[arguments](../../Glossary/vbe-glossary.md) must be expressed in the same units. For example, if **_life_** is given in months, **_period_** must also be given in months. All arguments must be positive numbers. ## Example diff --git a/Language/Reference/User-Interface-Help/tab-function.md b/Language/Reference/User-Interface-Help/tab-function.md index 5ef28b4a87a..3e7ecdba98b 100644 --- a/Language/Reference/User-Interface-Help/tab-function.md +++ b/Language/Reference/User-Interface-Help/tab-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Used with the **Print #** statement or the **Print** method to position output. - **Syntax** - **Tab** [ **(**_n_**)** ] + +## Syntax + +**Tab** [ **(**_n_**)** ] The optional _n_[argument](../../Glossary/vbe-glossary.md) is the column number moved to before displaying or printing the next[expression](../../Glossary/vbe-glossary.md) in a list. If omitted, **Tab** moves the insertion point to the beginning of the next[print zone](../../Glossary/vbe-glossary.md). This allows **Tab** to be used instead of a comma in[locales](../../Glossary/vbe-glossary.md) where the comma is used as a decimal separator. - **Remarks** + +## Remarks + If the current print position on the current line is greater than _n_, **Tab** skips to the _n_ th column on the next output line. If _n_ is less than 1, **Tab** moves the print position to column 1. If _n_ is greater than the output line width, **Tab** calculates the next print position using the formula: _n_**Mod**_width_ For example, if _width_ is 80 and you specify **Tab(** 90 **)**, the next print will start at column 10 (the remainder of 90/80). If _n_ is less than the current print position, printing begins on the next line at the calculated print position. If the calculated print position is greater than the current print position, printing begins at the calculated print position on the same line. diff --git a/Language/Reference/User-Interface-Help/tab-object.md b/Language/Reference/User-Interface-Help/tab-object.md index 5bedde05e03..643d7ed57ae 100644 --- a/Language/Reference/User-Interface-Help/tab-object.md +++ b/Language/Reference/User-Interface-Help/tab-object.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 A **Tab** is an individual member of a **Tabs** collection. - **Remarks** + +## Remarks + Visually, a **Tab** object appears as a rectangle protruding from a larger rectangular area or as a button adjacent to a rectangular area. In contrast to a **Page**, a **Tab** does not contain any controls. Controls that appear within the region bounded by a **TabStrip** are contained on the form, as is the **TabStrip**. Each **Tab** has its own set of properties, but has no methods or events. You must use events from the appropriate **TabStrip** to initiate processing of an individual **Tab**. diff --git a/Language/Reference/User-Interface-Help/tabfixedheight-tabfixedwidth-properties.md b/Language/Reference/User-Interface-Help/tabfixedheight-tabfixedwidth-properties.md index 79ea977b4d6..f98b450385f 100644 --- a/Language/Reference/User-Interface-Help/tabfixedheight-tabfixedwidth-properties.md +++ b/Language/Reference/User-Interface-Help/tabfixedheight-tabfixedwidth-properties.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Sets or returns the fixed height or width of the tabs in [points](../../Glossary/vbe-glossary.md). - **Syntax** - _object_. **TabFixedHeight** [= _Single_ ] + +## Syntax + +_object_. **TabFixedHeight** [= _Single_ ] _object_. **TabFixedWidth** [= _Single_ ] The **TabFixedHeight** and **TabFixedWidth** property syntaxes have these parts: @@ -28,6 +30,8 @@ The **TabFixedHeight** and **TabFixedWidth** property syntaxes have these parts **Settings** If the value is 0, tab widths are automatically adjusted so that each tab is wide enough to accommodate its contents and each row of tabs spans the width of the control. If the value is greater than 0, all tabs have an identical width as specified by this property. - **Remarks** + +## Remarks + The minimum size is 4 points. diff --git a/Language/Reference/User-Interface-Help/tabindex-property.md b/Language/Reference/User-Interface-Help/tabindex-property.md index 66add816645..3959da7d928 100644 --- a/Language/Reference/User-Interface-Help/tabindex-property.md +++ b/Language/Reference/User-Interface-Help/tabindex-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the position of a single object in the form's [tab order](../../Glossary/vbe-glossary.md). - **Syntax** - _object_. **TabIndex** [= _Integer_ ] + +## Syntax + +_object_. **TabIndex** [= _Integer_ ] The **TabIndex** property syntax has these parts: @@ -26,6 +28,7 @@ The **TabIndex** property syntax has these parts: | _object_|Required. A valid object.| | _Integer_|Optional. An integer from 0 to one less than the number of controls on the form that have a **TabIndex** property. Assigning a **TabIndex** value of less than 0 generates an error. If you assign a **TabIndex** value greater than the largest index value, the system resets the value to the maximum allowable value.| - **Remarks** +## Remarks + The index value of the first object in the tab order is zero. diff --git a/Language/Reference/User-Interface-Help/tabkeybehavior-property.md b/Language/Reference/User-Interface-Help/tabkeybehavior-property.md index 2e52e1f37ac..466b3111fa3 100644 --- a/Language/Reference/User-Interface-Help/tabkeybehavior-property.md +++ b/Language/Reference/User-Interface-Help/tabkeybehavior-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Determines whether tabs are allowed in the edit region. - **Syntax** - _object_. **TabKeyBehavior** [= _Boolean_ ] + +## Syntax + +_object_. **TabKeyBehavior** [= _Boolean_ ] The **TabKeyBehavior** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|Pressing TAB inserts a tab character in the edit region.| |**False**|Pressing TAB moves the focus to the next object in the tab order (default).| - **Remarks** +## Remarks + The **TabKeyBehavior** and **MultiLine** properties are closely related. The values described above only apply if **MultiLine** is **True**. If **MultiLine** is **False**, pressing TAB always moves the[focus](../../Glossary/vbe-glossary.md) to the next control in the[tab order](../../Glossary/vbe-glossary.md) regardless of the value of **TabKeyBehavior**. The effect of pressing CTRL+TAB also depends on the value of **MultiLine**. If **MultiLine** is **True**, pressing CTRL+TAB creates a new line regardless of the value of **TabKeyBehavior**. If **MultiLine** is **False**, pressing CTRL+TAB has no effect. diff --git a/Language/Reference/User-Interface-Help/taborientation-property.md b/Language/Reference/User-Interface-Help/taborientation-property.md index 8e480739294..0346b6cb45f 100644 --- a/Language/Reference/User-Interface-Help/taborientation-property.md +++ b/Language/Reference/User-Interface-Help/taborientation-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the location of the tabs on a **MultiPage** or **TabStrip**. - **Syntax** - _object_. **TabOrientation** [= _fmTabOrientation_ ] + +## Syntax + +_object_. **TabOrientation** [= _fmTabOrientation_ ] The **TabOrientation** property syntax has these parts: @@ -37,6 +39,7 @@ The settings for _fmTabOrientation_ are: | _fmTabOrientationLeft_|2|The tabs appear at the left side of the control.| | _fmTabOrientationRight_|3|The tabs appear at the right side of the control.| - **Remarks** +## Remarks + If you use TrueType fonts, the text rotates when the **TabOrientation** property is set to **fmTabOrientationLeft** or **fmTabOrientationRight**. If you use bitmapped fonts, the text does not rotate. diff --git a/Language/Reference/User-Interface-Help/tabs-collection-microsoft-forms.md b/Language/Reference/User-Interface-Help/tabs-collection-microsoft-forms.md index 0d635b0fc04..e493d2b1d89 100644 --- a/Language/Reference/User-Interface-Help/tabs-collection-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/tabs-collection-microsoft-forms.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 A **Tabs** collection includes all **Tabs** of a **TabStrip**. - **Remarks** + +## Remarks + Each **Tabs** collection provides the features to manage the number of tabs in the[collection](../../Glossary/vbe-glossary.md) and to identify the tab that is currently in use. The default value of the **Tabs** collection identifies the current **Tab** of a collection. A **Tab** object has a unique name and index value within a **Tabs** collection. You can reference a **Tab** either by its name or its index value. The index value reflects the ordinal position of the **Tab** within the collection. The index of the first **Tab** in a collection is 0; the index of the second **Tab** is 1; and so on. diff --git a/Language/Reference/User-Interface-Help/tabstop-property-vbe-dev.md b/Language/Reference/User-Interface-Help/tabstop-property-vbe-dev.md index 1f3939e0f97..b7209539c93 100644 --- a/Language/Reference/User-Interface-Help/tabstop-property-vbe-dev.md +++ b/Language/Reference/User-Interface-Help/tabstop-property-vbe-dev.md @@ -11,8 +11,10 @@ ms.date: 06/08/2017 Indicates whether an object can receive [focus](../../Glossary/vbe-glossary.md) when the user tabs to it. - **Syntax** - _object_. **TabStop** [= _Boolean_ ] + +## Syntax + +_object_. **TabStop** [= _Boolean_ ] The **TabStop** property syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/tabstrip-control.md b/Language/Reference/User-Interface-Help/tabstrip-control.md index ef50ed3f0cb..e2b70c465f6 100644 --- a/Language/Reference/User-Interface-Help/tabstrip-control.md +++ b/Language/Reference/User-Interface-Help/tabstrip-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Presents a set of related controls as a visual group. - **Remarks** + +## Remarks + You can use a **TabStrip** to view different sets of information for related controls. For example, the controls might represent information about a daily schedule for a group of individuals, with each set of information corresponding to a different individual in the group. Set the title of each tab to show one individual's name. Then, you can write code that, when you click a tab, updates the controls to show information about the person identified on the tab. diff --git a/Language/Reference/User-Interface-Help/tag-property.md b/Language/Reference/User-Interface-Help/tag-property.md index a5995267074..b0317b243a5 100644 --- a/Language/Reference/User-Interface-Help/tag-property.md +++ b/Language/Reference/User-Interface-Help/tag-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Stores additional information about an object. - **Syntax** - _object_. **Tag** [= _String_ ] + +## Syntax + +_object_. **Tag** [= _String_ ] The **Tag** property syntax has these parts: @@ -26,7 +28,8 @@ The **Tag** property syntax has these parts: | _object_|Required. A valid object.| | _String_|Optional. A string expression identifying the object. The default is a zero-length string ("").| - **Remarks** +## Remarks + Use the **Tag** property to assign an identification string to an object without affecting other property settings or attributes. For example, you can use **Tag** to check the identity of a form or control that is passed as a variable to a procedure. diff --git a/Language/Reference/User-Interface-Help/takefocusonclick-property.md b/Language/Reference/User-Interface-Help/takefocusonclick-property.md index 301f4144a6f..9e9ee6e0089 100644 --- a/Language/Reference/User-Interface-Help/takefocusonclick-property.md +++ b/Language/Reference/User-Interface-Help/takefocusonclick-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether a control takes the [focus](../../Glossary/vbe-glossary.md) when clicked. - **Syntax** - _object_. **TakeFocusOnClick** [= _Boolean_ ] + +## Syntax + +_object_. **TakeFocusOnClick** [= _Boolean_ ] The **TakeFocusOnClick** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|The button takes the focus when clicked (default).| |**False**|The button does not take the focus when clicked.| - **Remarks** +## Remarks + The **TakeFocusOnClick** property defines only what happens when the user clicks a control. If the user tabs to the control, the control takes the focus regardless of the value of **TakeFocusOnClick**. Use this property to complete actions that affect a control without requiring that control to give up focus. For example, assume your form includes a **TextBox** and a **CommandButton** that checks for correct spelling of text. You would like to be able to select text in the **TextBox**, then click the **CommandButton** and run the spelling checker without taking focus away from the **TextBox**. You can do this by setting the **TakeFocusOnClick** property of the **CommandButton** to **False**. diff --git a/Language/Reference/User-Interface-Help/tan-function.md b/Language/Reference/User-Interface-Help/tan-function.md index 89ccd776b6c..412a733c002 100644 --- a/Language/Reference/User-Interface-Help/tan-function.md +++ b/Language/Reference/User-Interface-Help/tan-function.md @@ -14,11 +14,15 @@ ms.date: 06/08/2017 Returns a **Double** specifying the tangent of an angle. - **Syntax** - **Tan(**_number_**)** + +## Syntax + +**Tan(**_number_**)** The required _number_[argument](../../Glossary/vbe-glossary.md) is a[Double](../../Glossary/vbe-glossary.md) or any valid[numeric expression](../../Glossary/vbe-glossary.md) that expresses an angle in radians. - **Remarks** - **Tan** takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle. + +## Remarks + +**Tan** takes an angle and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle. To convert degrees to radians, multiply degrees by [pi](../../Glossary/vbe-glossary.md)/180. To convert radians to degrees, multiply radians by 180/pi. ## Example diff --git a/Language/Reference/User-Interface-Help/terminate-event-visual-basic-for-applications.md b/Language/Reference/User-Interface-Help/terminate-event-visual-basic-for-applications.md index fd4d5638f59..1b936eed394 100644 --- a/Language/Reference/User-Interface-Help/terminate-event-visual-basic-for-applications.md +++ b/Language/Reference/User-Interface-Help/terminate-event-visual-basic-for-applications.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Occurs when all references to an instance of an object are removed from memory by setting all [variables](../../Glossary/vbe-glossary.md) that refer to the object to **Nothing** or when the last reference to the object goes out of[scope](../../Glossary/vbe-glossary.md). - **Syntax** - **Private Sub**_object_**_Terminate( )** + +## Syntax + +**Private Sub**_object_**_Terminate( )** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + The Terminate event occurs after the object is unloaded. The Terminate event isn't triggered if the instances of the **UserForm** or[class](../../Glossary/vbe-glossary.md) are removed from memory because the application terminated abnormally. For example, if your application invokes the **End** statement before removing all existing instances of the class or **UserForm** from memory, the Terminate event isn't triggered for that class or **UserForm**. diff --git a/Language/Reference/User-Interface-Help/text-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/text-property-microsoft-forms.md index 29e76d29c04..bbc48d6b3a2 100644 --- a/Language/Reference/User-Interface-Help/text-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/text-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns or sets the text in a **TextBox**. Changes the selected row in a **ComboBox** or **ListBox**. - **Syntax** - _object_. **Text** [= _String_ ] + +## Syntax + +_object_. **Text** [= _String_ ] The **Text** property syntax has these parts: @@ -24,7 +26,8 @@ The **Text** property syntax has these parts: | _object_|Required. A valid object.| | _String_|Optional. A string expression specifying text. The default value is a zero-length string ("").| - **Remarks** +## Remarks + For a **TextBox**, any value you assign to the **Text** property is also assigned to the **Value** property. For a **ComboBox**, you can use **Text** to update the value of the control. If the value of **Text** matches an existing list entry, the value of the **ListIndex** property (the index of the current row) is set to the row that matches **Text**. If the value of **Text** does not match a row, **ListIndex** is set to -1. For a **ListBox**, the value of **Text** must match an existing list entry. Specifying a value that does not match an existing list entry causes an error. diff --git a/Language/Reference/User-Interface-Help/textalign-property.md b/Language/Reference/User-Interface-Help/textalign-property.md index 28b6ee61253..d1df585c0be 100644 --- a/Language/Reference/User-Interface-Help/textalign-property.md +++ b/Language/Reference/User-Interface-Help/textalign-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies how text is aligned in a control. - **Syntax** - _object_. **TextAlign** [= _fmTextAlign_ ] + +## Syntax + +_object_. **TextAlign** [= _fmTextAlign_ ] The **TextAlign** property syntax has these parts: @@ -36,6 +38,7 @@ The settings for _fmTextAlign_ are: | _fmTextAlignCenter_|2|Centers the text in the control's display or edit area.| | _fmTextAlignRight_|3|Aligns the last character of displayed text with the right edge of the control's display or edit area.| - **Remarks** +## Remarks + For a **ComboBox**, the **TextAlign** property only affects the edit region; this property has no effect on the alignment of text in the list. For stand-alone labels, **TextAlign** determines the alignment of the label's caption. diff --git a/Language/Reference/User-Interface-Help/textbox-control.md b/Language/Reference/User-Interface-Help/textbox-control.md index 6f627f07c58..ab42ade25dc 100644 --- a/Language/Reference/User-Interface-Help/textbox-control.md +++ b/Language/Reference/User-Interface-Help/textbox-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Displays information from a user or from an organized set of data. - **Remarks** + +## Remarks + A **TextBox** is the control most commonly used to display information entered by a user. Also, it can display a set of data, such as a table, query, worksheet, or a calculation result. If a **TextBox** is[bound](../../../language/Glossary/glossary-vba.md) to a[data source](../../../language/Glossary/glossary-vba.md), then changing the contents of the **TextBox** also changes the value of the bound data source. Formatting applied to any piece of text in a **TextBox** will affect all text in the control. For example, if you change the font or point size of any character in the control, the change will affect all characters in the control. The default property for a **TextBox** is the **Value** property. diff --git a/Language/Reference/User-Interface-Help/textcolumn-property.md b/Language/Reference/User-Interface-Help/textcolumn-property.md index ec69a4118b2..8fc7470738e 100644 --- a/Language/Reference/User-Interface-Help/textcolumn-property.md +++ b/Language/Reference/User-Interface-Help/textcolumn-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Identifies the column in a **ComboBox** or **ListBox** to store in the **Text** property when the user selects a row. - **Syntax** - _object_. **TextColumn** [= _Variant_ ] + +## Syntax + +_object_. **TextColumn** [= _Variant_ ] The **TextColumn** property syntax has these parts: @@ -28,7 +30,9 @@ The **TextColumn** property syntax has these parts: **Settings** Values for the **TextColumn** property range from -1 to the number of columns in the list. The **TextColumn** value for the first column is 1, the value of the second column is 2, and so on. Setting **TextColumn** to 0 displays the **ListIndex** values. Setting **TextColumn** to -1 displays the first column that has a **ColumnWidths** value greater than 0. - **Remarks** + +## Remarks + In a combo box, the system displays the column designated by the **TextColumn** property in the text box portion of the control. When the user selects a row from a **ComboBox** or **ListBox**, the column referenced by **TextColumn** is stored in the **Text** property.For example, you could set up a multicolumn **ListBox** that contains the names of holidays in one column and dates for the holidays in a second column. To present the holiday names to users, specify the first column as the **TextColumn**. To store the dates of the holidays, specify the second column as the **BoundColumn**. To hide the dates of the holidays, set the **ColumnWidths** property of the sceond column to zero. When the **Text** property of a **ComboBox** changes (such as when a user types an entry into the control), the new text is compared to the column of data specified by **TextColumn**. diff --git a/Language/Reference/User-Interface-Help/textlength-property.md b/Language/Reference/User-Interface-Help/textlength-property.md index 12ee6064607..dfad11dcecc 100644 --- a/Language/Reference/User-Interface-Help/textlength-property.md +++ b/Language/Reference/User-Interface-Help/textlength-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Returns the length, in characters, of text in the edit region of a **TextBox** or **ComboBox**. - **Syntax** - _object_. **TextLength** + +## Syntax + +_object_. **TextLength** The **TextLength** property syntax has these parts: @@ -25,6 +27,7 @@ The **TextLength** property syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The **TextLength** property is read-only. For a multiline **TextBox**, **TextLength** includes LF (line feed) and CR (carriage return) characters. diff --git a/Language/Reference/User-Interface-Help/textstream-object.md b/Language/Reference/User-Interface-Help/textstream-object.md index d2c4dcf5d2d..e5e1258c0f8 100644 --- a/Language/Reference/User-Interface-Help/textstream-object.md +++ b/Language/Reference/User-Interface-Help/textstream-object.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Facilitates sequential access to file. - **Syntax** - **TextStream.** { _property_ | _method_ } + +## Syntax + +**TextStream.** { _property_ | _method_ } The _property_ and _method_ arguments can be any of the properties and methods associated with the **TextStream** object. Note that in actual usage **TextStream** is replaced by a variable placeholder representing the **TextStream** object returned from the **FileSystemObject**. - **Remarks** + +## Remarks + In the following code, `a` is the **TextStream** object returned by the **CreateTextFile** method on the **FileSystemObject**: **WriteLine** and **Close** are two methods of the **TextStream** Object. diff --git a/Language/Reference/User-Interface-Help/time-function.md b/Language/Reference/User-Interface-Help/time-function.md index 6dc5d069b91..a3d66d73a84 100644 --- a/Language/Reference/User-Interface-Help/time-function.md +++ b/Language/Reference/User-Interface-Help/time-function.md @@ -14,9 +14,13 @@ ms.date: 06/08/2017 Returns a **Variant** (**Date**) indicating the current system time. - **Syntax** - **Time** - **Remarks** + +## Syntax + +**Time** + +## Remarks + To set the system time, use the **Time** statement. ## Example diff --git a/Language/Reference/User-Interface-Help/time-statement.md b/Language/Reference/User-Interface-Help/time-statement.md index 0903732fc2d..249b71059dc 100644 --- a/Language/Reference/User-Interface-Help/time-statement.md +++ b/Language/Reference/User-Interface-Help/time-statement.md @@ -13,12 +13,14 @@ ms.date: 06/08/2017 Sets the system time. - **Syntax** +## Syntax - **Time =**_time_ +**Time =**_time_ The required _time_[argument](../../Glossary/vbe-glossary.md) is any[numeric expression](../../Glossary/vbe-glossary.md), [string expression](../../Glossary/vbe-glossary.md), or any combination, that can represent a time. - **Remarks** + +## Remarks + If _time_ is a string, **Time** attempts to convert it to a time using the time separators you specified for your system. If it can't be converted to a valid time, an error occurs. ## Example diff --git a/Language/Reference/User-Interface-Help/timer-function.md b/Language/Reference/User-Interface-Help/timer-function.md index 22c8253d283..46977497c36 100644 --- a/Language/Reference/User-Interface-Help/timer-function.md +++ b/Language/Reference/User-Interface-Help/timer-function.md @@ -14,9 +14,13 @@ ms.date: 06/08/2017 Returns a **Single** representing the number of seconds elapsed since midnight. - **Syntax** - **Timer** - **Remarks** + +## Syntax + +**Timer** + +## Remarks + In Microsoft Windows the **Timer** function returns fractional portions of a second. On the Macintosh, timer resolution is one second. ## Example diff --git a/Language/Reference/User-Interface-Help/timeserial-function.md b/Language/Reference/User-Interface-Help/timeserial-function.md index f1cf96472f3..ff1c86bb285 100644 --- a/Language/Reference/User-Interface-Help/timeserial-function.md +++ b/Language/Reference/User-Interface-Help/timeserial-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Date**) containing the time for a specific hour, minute, and second. - **Syntax** - **TimeSerial( _hour,_ _minute,_ _second_ )** + +## Syntax + +**TimeSerial( _hour,_ _minute,_ _second_ )** The **TimeSerial** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -25,7 +27,8 @@ The **TimeSerial** function syntax has these[named arguments](../../Glossary/vb |**_minute_**|Required; **Variant** (**Integer**). Any numeric expression.| |**_second_**|Required; **Variant** (**Integer**). Any numeric expression.| - **Remarks** +## Remarks + To specify a time, such as 11:59:59, the range of numbers for each **TimeSerial** argument should be in the normal range for the unit; that is, 0-23 for hours and 0-59 for minutes and seconds. However, you can also specify relative times for each[argument](../../Glossary/vbe-glossary.md) using any numeric expression that represents some number of hours, minutes, or seconds before or after a certain time. The following example uses[expressions](../../Glossary/vbe-glossary.md) instead of absolute time numbers. The **TimeSerial** function returns a time for 15 minutes before ( `-15`) six hours before noon ( `12 - 6`), or 5:45:00 A.M. diff --git a/Language/Reference/User-Interface-Help/timevalue-function.md b/Language/Reference/User-Interface-Help/timevalue-function.md index ba8ee39c251..42afd112b1e 100644 --- a/Language/Reference/User-Interface-Help/timevalue-function.md +++ b/Language/Reference/User-Interface-Help/timevalue-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Variant** (**Date**) containing the time. - **Syntax** - **TimeValue(**_time_**)** + +## Syntax + +**TimeValue(**_time_**)** The required _time_[argument](../../Glossary/vbe-glossary.md) is normally a[string expression](../../Glossary/vbe-glossary.md) representing a time from 0:00:00 (12:00:00 A.M.) to 23:59:59 (11:59:59 P.M.), inclusive. However, _time_ can also be any[expression](../../Glossary/vbe-glossary.md) that represents a time in that range. If _time_ contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned. - **Remarks** + +## Remarks + You can enter valid times using a 12-hour or 24-hour clock. For example, `"2:24PM"` and `"14:24"` are both valid _time_ arguments. If the _time_ argument contains date information, **TimeValue** doesn't return it. However, if _time_ includes invalid date information, an error occurs. diff --git a/Language/Reference/User-Interface-Help/togglebutton-control.md b/Language/Reference/User-Interface-Help/togglebutton-control.md index 20a55aaecfc..8605f3e4604 100644 --- a/Language/Reference/User-Interface-Help/togglebutton-control.md +++ b/Language/Reference/User-Interface-Help/togglebutton-control.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Shows the selection state of an item. - **Remarks** + +## Remarks + Use a **ToggleButton** to show whether an item is selected. If a **ToggleButton** is[bound](../../../language/Glossary/glossary-vba.md) to a[data source](../../../language/Glossary/glossary-vba.md), the **ToggleButton** shows the current value of that data source as either _Yes_ / _No_, _True_ / _False_, _On_ / _Off_, or some other choice of two settings. If the user selects the **ToggleButton**, the current setting is _Yes_, _True_, or _On_; if the user does not select the **ToggleButton**, the setting is _No_, _False_, or _Off_. If the **ToggleButton** is bound to a data source, changing the setting changes the value of that data source. A disabled **ToggleButton** shows a value, but is dimmed and does not allow changes from the user interface. You can also use a **ToggleButton** inside a **Frame** to select one or more of a group of related items. For example, you can create an order form with a list of available items, with a **ToggleButton** preceding each item. The user can select a particular item by selecting the appropriate **ToggleButton**. The default property of a **ToggleButton** is the **Value** property. diff --git a/Language/Reference/User-Interface-Help/top-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/top-property-vba-add-in-object-model.md index 14552156573..689cf4301b2 100644 --- a/Language/Reference/User-Interface-Help/top-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/top-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a [Single](../../Glossary/vbe-glossary.md) specifying the location of the top of the window on the screen in[twips](../../Glossary/vbe-glossary.md). Read/write. - **Remarks** + +## Remarks + The value returned by the **Top** property depends on whether or not the window is[docked](../../Glossary/vbe-glossary.md), [linked](../../Glossary/vbe-glossary.md), or in docking view. **Note** Changing the **Top** property setting of a linked or docked window has no effect as long as the window remains linked or docked. diff --git a/Language/Reference/User-Interface-Help/topindex-property.md b/Language/Reference/User-Interface-Help/topindex-property.md index 643b02c07cf..9f547b378fd 100644 --- a/Language/Reference/User-Interface-Help/topindex-property.md +++ b/Language/Reference/User-Interface-Help/topindex-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Sets and returns the item that appears in the topmost position in the list. - **Syntax** - _object_. **TopIndex** [= _Variant_ ] + +## Syntax + +_object_. **TopIndex** [= _Variant_ ] The **TopIndex** property syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/topline-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/topline-property-vba-add-in-object-model.md index 09282f8eef5..3c3b1dce9e5 100644 --- a/Language/Reference/User-Interface-Help/topline-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/topline-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) specifying the line number of the line at the top of the[code pane](../../Glossary/vbe-glossary.md) or sets the line showing at the top of the code pane. Read/write. - **Remarks** + +## Remarks + Use the **TopLine** property to return or set the line showing at the top of the code pane. For example, if you want line 25 to be the first line showing in a code pane, set the **TopLine** property to 25. The **TopLine** property setting must be a positive number. If the **TopLine** property setting is greater than the actual number of lines in the code pane, the setting will be the last line in the code pane. diff --git a/Language/Reference/User-Interface-Help/totalsize-property.md b/Language/Reference/User-Interface-Help/totalsize-property.md index bea9f0ef1a1..d37f6c5ba87 100644 --- a/Language/Reference/User-Interface-Help/totalsize-property.md +++ b/Language/Reference/User-Interface-Help/totalsize-property.md @@ -17,10 +17,14 @@ ms.date: 06/08/2017 **Description** Returns the total space, in bytes, of a drive or network share. - **Syntax** - _object_. **TotalSize** + +## Syntax + +_object_. **TotalSize** The _object_ is always a **Drive** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **TotalSize** property: diff --git a/Language/Reference/User-Interface-Help/transitioneffect-property.md b/Language/Reference/User-Interface-Help/transitioneffect-property.md index 78cedee142b..1d3d22f3a93 100644 --- a/Language/Reference/User-Interface-Help/transitioneffect-property.md +++ b/Language/Reference/User-Interface-Help/transitioneffect-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the visual effect to use when changing from one page to another. - **Syntax** - _object_. **TransitionEffect** [= _fmTransitionEffect_ ] + +## Syntax + +_object_. **TransitionEffect** [= _fmTransitionEffect_ ] The **TransitionEffect** property syntax has these parts: @@ -46,6 +48,7 @@ The settings for _fmTransitionEffect_ are: | _fmTransitionEffectPushDown_|11|The new page pushes the old page out of view, moving from the top to the bottom.| | _fmTransitionEffectPushLeft_|12|The new page pushes the old page out of view, moving from the right to the left.| - **Remarks** +## Remarks + Use the **TransitionPeriod** property to specify the duration of a transition effect. diff --git a/Language/Reference/User-Interface-Help/transitionperiod-property.md b/Language/Reference/User-Interface-Help/transitionperiod-property.md index 158a9548e29..7b283e52449 100644 --- a/Language/Reference/User-Interface-Help/transitionperiod-property.md +++ b/Language/Reference/User-Interface-Help/transitionperiod-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies the duration, in milliseconds, of a transition effect. - **Syntax** - _object_. **TransitionPeriod** [= _Long_ ] + +## Syntax + +_object_. **TransitionPeriod** [= _Long_ ] The **TransitionPeriod** property syntax has these parts: @@ -26,6 +28,7 @@ The **TransitionPeriod** property syntax has these parts: | _object_|Required. A valid object.| | _Long_|Optional. How long it takes to complete the transition from one page to another.| - **Remarks** +## Remarks + Any integer from zero to 10000 is a valid setting for this property. Setting the **TransitionPeriod** property to zero disables the transition effect; setting **TransitionPeriod** to 10000 creates a 10-second transition. diff --git a/Language/Reference/User-Interface-Help/triplestate-property.md b/Language/Reference/User-Interface-Help/triplestate-property.md index 880395a7f1f..419a165a540 100644 --- a/Language/Reference/User-Interface-Help/triplestate-property.md +++ b/Language/Reference/User-Interface-Help/triplestate-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Determines whether a user can specify, from the user interface, the [Null](../../Glossary/vbe-glossary.md) state for a **CheckBox** or **ToggleButton**. - **Syntax** - _object_. **TripleState** [= _Boolean_ ] + +## Syntax + +_object_. **TripleState** [= _Boolean_ ] The **TripleState** property syntax has these parts: @@ -35,7 +37,8 @@ The settings for _Boolean_ are: |**True**|The button clicks through three states.| |**False**|The button only supports True and False (default).| - **Remarks** +## Remarks + Although the **TripleState** property exists on the **OptionButton**, the property is disabled. Regardless of the value of **TripleState**, you cannot set the control to **Null** through the user interface. When the **TripleState** property is **True**, a user can choose from the values of **Null**, **True**, and **False**. The null value is displayed as a shaded button. When **TripleState** is **False**, the user can choose either **True** or **False**. diff --git a/Language/Reference/User-Interface-Help/type-property-filesystemobject-object.md b/Language/Reference/User-Interface-Help/type-property-filesystemobject-object.md index 633799d67b4..83e627874cf 100644 --- a/Language/Reference/User-Interface-Help/type-property-filesystemobject-object.md +++ b/Language/Reference/User-Interface-Help/type-property-filesystemobject-object.md @@ -15,10 +15,14 @@ ms.date: 06/08/2017 **Description** Returns information about the type of a file or folder. For example, for files ending in .TXT, "Text Document" is returned. - **Syntax** - _object_. **Type** + +## Syntax + +_object_. **Type** The _object_ is always a **File** or **Folder** object. - **Remarks** + +## Remarks + The following code illustrates the use of the **Type** property to return a folder type. In this example, try providing the path of the Recycle Bin or other unique folder to the procedure. diff --git a/Language/Reference/User-Interface-Help/type-statement.md b/Language/Reference/User-Interface-Help/type-statement.md index 5c3fa33675f..8000ac2bb72 100644 --- a/Language/Reference/User-Interface-Help/type-statement.md +++ b/Language/Reference/User-Interface-Help/type-statement.md @@ -13,7 +13,7 @@ ms.date: 06/08/2017 Used at [module level](../../Glossary/vbe-glossary.md) to define a user-defined[data type](../../Glossary/vbe-glossary.md) containing one or more elements. - **Syntax** +## Syntax [ **Private** | **Public** ] **Type** _varname_ _elementname_ [ **(** [ _subscripts_ ] **)** ] **As** _type_ @@ -33,7 +33,7 @@ The **Type** statement syntax has these parts: | _subscripts_|When not explicitly stated in _lower_, the lower bound of an array is controlled by the **Option** **Base** statement. The lower bound is zero if no **Option** **Base** statement is present.| | _type_|Required. Data type of the element; may be [Byte](../../Glossary/vbe-glossary.md), [Boolean](../../Glossary/vbe-glossary.md), [Integer](../../Glossary/vbe-glossary.md), [Long](../../Glossary/vbe-glossary.md), [Currency](../../Glossary/vbe-glossary.md), [Single](../../Glossary/vbe-glossary.md), [Double](../../Glossary/vbe-glossary.md), [Decimal](../../Glossary/vbe-glossary.md) (not currently supported),[Date](../../Glossary/vbe-glossary.md), [String](../../Glossary/vbe-glossary.md) (for variable-length strings), **String** * _length_ (for fixed-length strings),[Object](../../Glossary/vbe-glossary.md), [Variant](../../Glossary/vbe-glossary.md), another user-defined type, or an [object type](../../Glossary/vbe-glossary.md).| -**Remarks** +## Remarks The **Type** statement can be used only at module level. Once you have declared a user-defined type using the **Type** statement, you can declare a variable of that type anywhere within the[scope](../../Glossary/vbe-glossary.md) of the declaration. Use **Dim**, **Private**, **Public**, **ReDim**, or **Static** to declare a variable of a user-defined type. In [standard modules](../../Glossary/vbe-glossary.md) and[class modules](../../Glossary/vbe-glossary.md), user-defined types are public by default. This visibility can be changed using the **Private** keyword. diff --git a/Language/Reference/User-Interface-Help/ubound-function.md b/Language/Reference/User-Interface-Help/ubound-function.md index c996a75b267..0cedbd2b7fb 100644 --- a/Language/Reference/User-Interface-Help/ubound-function.md +++ b/Language/Reference/User-Interface-Help/ubound-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a [Long](../../Glossary/vbe-glossary.md) containing the largest available subscript for the indicated dimension of an[array](../../Glossary/vbe-glossary.md). - **Syntax** - **UBound(**_arrayname_ [ **,**_dimension_ ] **)** + +## Syntax + +**UBound(**_arrayname_ [ **,**_dimension_ ] **)** The **UBound** function syntax has these parts: @@ -24,7 +26,8 @@ The **UBound** function syntax has these parts: | _arrayname_|Required. Name of the array [variable](../../Glossary/vbe-glossary.md); follows standard variable naming conventions.| | _dimension_|Optional; **Variant** (**Long**). Whole number indicating which dimension's upper bound is returned. Use 1 for the first dimension, 2 for the second, and so on. If _dimension_ is omitted, 1 is assumed.| - **Remarks** +## Remarks + The **UBound** function is used with the **LBound** function to determine the size of an array. Use the **LBound** function to find the lower limit of an array dimension. **UBound** returns the following values for an array with these dimensions: diff --git a/Language/Reference/User-Interface-Help/ucase-function.md b/Language/Reference/User-Interface-Help/ucase-function.md index 3998051fe64..a99e8fc6915 100644 --- a/Language/Reference/User-Interface-Help/ucase-function.md +++ b/Language/Reference/User-Interface-Help/ucase-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns a **Variant** (**String**) containing the specified string, converted to uppercase. - **Syntax** - **UCase** ( _string_ ) + +## Syntax + +**UCase** ( _string_ ) The required _string_[argument](../../Glossary/vbe-glossary.md) is any valid[string expression](../../Glossary/vbe-glossary.md). If _string_ contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned. - **Remarks** + +## Remarks + Only lowercase letters are converted to uppercase; all uppercase letters and nonletter characters remain unchanged. ## Example diff --git a/Language/Reference/User-Interface-Help/undoaction-method.md b/Language/Reference/User-Interface-Help/undoaction-method.md index 9d7ae119734..a8e034b9c43 100644 --- a/Language/Reference/User-Interface-Help/undoaction-method.md +++ b/Language/Reference/User-Interface-Help/undoaction-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Reverses the most recent action that supports the Undo command. - **Syntax** - _Boolean_ = _object_. **UndoAction** + +## Syntax + +_Boolean_ = _object_. **UndoAction** The **UndoAction** method syntax has these parts: @@ -25,7 +27,8 @@ The **UndoAction** method syntax has these parts: |:-----|:-----| | _object_|Required. A valid object.| - **Remarks** +## Remarks + The Undo command in the user interface uses the **UndoAction** method. For example, if you paste text into a **TextBox**, you can use **UndoAction** to remove that text and restore the previous contents of the **TextBox**. Not all user actions can be undone. If an action cannot be undone, the Undo command is unavailable following the action. diff --git a/Language/Reference/User-Interface-Help/unload-statement.md b/Language/Reference/User-Interface-Help/unload-statement.md index 378e64668eb..f0b592ae547 100644 --- a/Language/Reference/User-Interface-Help/unload-statement.md +++ b/Language/Reference/User-Interface-Help/unload-statement.md @@ -13,12 +13,14 @@ ms.date: 06/08/2017 Removes an object from memory. - **Syntax** +## Syntax - **Unload**_object_ +**Unload**_object_ The required _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + When an object is unloaded, it's removed from memory and all memory associated with the object is reclaimed. Until it is placed in memory again using the **Load** statement, a user can't interact with an object, and the object can't be manipulated programmatically. ## Example diff --git a/Language/Reference/User-Interface-Help/update-method-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/update-method-vba-add-in-object-model.md index 0202f0ffc2e..c1ff7d766b2 100644 --- a/Language/Reference/User-Interface-Help/update-method-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/update-method-vba-add-in-object-model.md @@ -14,9 +14,13 @@ ms.date: 06/08/2017 Refreshes the contents of the **AddIns** collection from the add-ins listed in the Vbaddin.ini file in the same manner as if the user had opened the Add-In Manager dialog box. - **Syntax** - _object_. **Update** + +## Syntax + +_object_. **Update** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. - **Remarks** + +## Remarks + All add-ins listed in the Vbaddin.ini file must be registered ActiveX components in the Registry before they can be used in Visual Basic. diff --git a/Language/Reference/User-Interface-Help/userform-object.md b/Language/Reference/User-Interface-Help/userform-object.md index e3064f44890..b0851f81820 100644 --- a/Language/Reference/User-Interface-Help/userform-object.md +++ b/Language/Reference/User-Interface-Help/userform-object.md @@ -17,11 +17,15 @@ ms.date: 06/08/2017 A **UserForm**[object](../../Glossary/vbe-glossary.md) is a window or dialog box that makes up part of an application's user interface. The **UserForms**[collection](../../Glossary/vbe-glossary.md) is a collection whose elements represent each loaded **UserForm** in an application. The **UserForms** collection has a **Count** property, an **Item** property, and an **Add** method. **Count** specifies the number of elements in the collection; **Item** (the default member) specifies a specific collection member; and **Add** places a new **UserForm** element in the collection. - **Syntax** - **UserForm** + +## Syntax + +**UserForm** **UserForms** [ **.Item** ] **(**_index_**)** The placeholder _index_ represents an integer with a range from 0 to **UserForms.Count** - 1. **Item** is the default member of the **UserForms** collection and need not be specified. - **Remarks** + +## Remarks + You can use the **UserForms** collection to iterate through all loaded user forms in an application. It identifies an intrinsic global[variable](../../Glossary/vbe-glossary.md) named **UserForms**. You can pass **UserForms(**_index_**)** to a function whose[argument](../../Glossary/vbe-glossary.md) is specified as a **UserForm** class. User forms have [properties](../../Glossary/vbe-glossary.md) that determine appearance such as position, size, and color; and aspects of their behavior. User forms can also respond to events initiated by a user or triggered by the system. For example, you can write code in the **Initialize** event procedure of the **UserForm** to initialize[module-level](../../Glossary/vbe-glossary.md) variables before the **UserForm** is displayed. diff --git a/Language/Reference/User-Interface-Help/val-function.md b/Language/Reference/User-Interface-Help/val-function.md index 220d80371ea..9f1d514b928 100644 --- a/Language/Reference/User-Interface-Help/val-function.md +++ b/Language/Reference/User-Interface-Help/val-function.md @@ -14,10 +14,14 @@ ms.date: 06/08/2017 Returns the numbers contained in a string as a numeric value of appropriate type. - **Syntax** - **Val(**_string_**)** + +## Syntax + +**Val(**_string_**)** The required _string_[argument](../../Glossary/vbe-glossary.md) is any valid[string expression](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + The **Val** function stops reading the string at the first character it can't recognize as part of a number. Symbols and characters that are often considered parts of numeric values, such as dollar signs and commas, are not recognized. However, the function recognizes the radix prefixes `&;O` (for octal) and (for octal) and `&;H` (for hexadecimal). Blanks, tabs, and linefeed characters are stripped from the argument. The following returns the value 1615198: diff --git a/Language/Reference/User-Interface-Help/value-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/value-property-microsoft-forms.md index 8e3b988875f..d1dd4ae89ad 100644 --- a/Language/Reference/User-Interface-Help/value-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/value-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Specifies the state or content of a given control. - **Syntax** - _object_. **Value** [= _Variant_ ] + +## Syntax + +_object_. **Value** [= _Variant_ ] The **Value** property syntax has these parts: @@ -43,7 +45,8 @@ The **Value** property syntax has these parts: ||Zero (0) indicates the first page. The maximum value is one less than the number of pages.| |**TextBox**|The text in the edit region.| - **Remarks** +## Remarks + For a **CommandButton**, setting the **Value** property to **True** in a macro or procedure initiates the button's Click event. For a **ComboBox**, changing the contents of **Value** does not change the value of **BoundColumn**. To add or delete entries in a **ComboBox**, you can use the **AddItem** or **RemoveItem** method. **Value** cannot be used with a multi-select list box. diff --git a/Language/Reference/User-Interface-Help/value-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/value-property-vba-add-in-object-model.md index 1b3979b925b..329e4a8d842 100644 --- a/Language/Reference/User-Interface-Help/value-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/value-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a [Variant](../../Glossary/vbe-glossary.md) specifying the value of the[property](../../Glossary/vbe-glossary.md). Read/write. - **Remarks** + +## Remarks + Because the **Value** property returns a **Variant**, you can access any property. To access a list, use the **IndexedValue** property. If the property that the **Property** object represents is read/write, the **Value** property is read/write. If the property is read-only, attempting to set the **Value** property causes an error. If the property is write-only, attempting to return the **Value** property causes an error. The **Value** property is the default property for the **Property** object. diff --git a/Language/Reference/User-Interface-Help/vartype-function.md b/Language/Reference/User-Interface-Help/vartype-function.md index 8e50f644e33..71bf53a1b17 100644 --- a/Language/Reference/User-Interface-Help/vartype-function.md +++ b/Language/Reference/User-Interface-Help/vartype-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns an **Integer** indicating the subtype of a [variable](../../Glossary/vbe-glossary.md). - **Syntax** - **VarType(**_varname_**)** + +## Syntax + +**VarType(**_varname_**)** The required _varname_[argument](../../Glossary/vbe-glossary.md) is a [Variant](../../Glossary/vbe-glossary.md) containing any variable except a variable of a [user-defined type](../../Glossary/vbe-glossary.md). ## Return Values @@ -45,7 +47,8 @@ The required _varname_[argument](../../Glossary/vbe-glossary.md) is a [Variant] **Note** These [constants](../../Glossary/vbe-glossary.md) are specified by Visual Basic for Applications. The names can be used anywhere in your code in place of the actual values. - **Remarks** +## Remarks + The **VarType** function never returns the value for **vbArray** by itself. It is always added to some other value to indicate an array of a particular type. The constant **vbVariant** is only returned in conjunction with **vbArray** to indicate that the argument to the **VarType** function is an array of type **Variant**. For example, the value returned for an array of integers is calculated as **vbInteger** + **vbArray**, or 8194. If an object has a default [property](../../Glossary/vbe-glossary.md), **VarType** **(**_object_**)** returns the type of the object's default property. ## Example diff --git a/Language/Reference/User-Interface-Help/vbcomponent-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/vbcomponent-object-vba-add-in-object-model.md index 6d4661271c2..1c6900409da 100644 --- a/Language/Reference/User-Interface-Help/vbcomponent-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/vbcomponent-object-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Represents a component, such as a [class module](../../Glossary/vbe-glossary.md) or[standard module](../../Glossary/vbe-glossary.md), contained in a [project](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + Use the **VBComponent** object to access the[code module](../../Glossary/vbe-glossary.md) associated with a component or to change a component's property settings. You can use the **Type** property to find out what type of component the **VBComponent** object refers to. Use the **Collection** property to find out what[collection](../../Glossary/vbe-glossary.md) the component is in. diff --git a/Language/Reference/User-Interface-Help/vbcomponents-collection-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/vbcomponents-collection-vba-add-in-object-model.md index 71e5f42b27c..161694060ad 100644 --- a/Language/Reference/User-Interface-Help/vbcomponents-collection-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/vbcomponents-collection-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Represents the components contained in a [project](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + Use the **VBComponents** collection to access, add, or remove components in a project. A component can be a[form](../../Glossary/vbe-glossary.md), [module](../../Glossary/vbe-glossary.md), or [class](../../Glossary/vbe-glossary.md). The **VBComponents** collection is a standard[collection](../../Glossary/vbe-glossary.md) that can be used in a **For** **Each** block. You can use the **Parent** property to return the project the **VBComponents** collection is in. In Visual Basic for Applications, you can use **Import** method to add a component to a project from a file. diff --git a/Language/Reference/User-Interface-Help/vbcomponents-property.md b/Language/Reference/User-Interface-Help/vbcomponents-property.md index 48c58f4deb8..5f2568c5acd 100644 --- a/Language/Reference/User-Interface-Help/vbcomponents-property.md +++ b/Language/Reference/User-Interface-Help/vbcomponents-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Returns a collection of the components contained in a project. - **Remarks** + +## Remarks + Use the **VBComponents** collection to access, add, or remove components in a project. A component can be a form, module, or class. The **VBComponents** collection is a standard collection that can be used in a **For… Each** block. You can use the **Parent** property to return the project the **VBComponents** collection is in. In Visual Basic for Applications, you can use the **Import** method to add a component to a project from a file. diff --git a/Language/Reference/User-Interface-Help/vbe-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/vbe-object-vba-add-in-object-model.md index e3ca396612b..2f12047353c 100644 --- a/Language/Reference/User-Interface-Help/vbe-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/vbe-object-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 The root object that contains all other [objects](../../Glossary/vbe-glossary.md) and[collections](../../Glossary/vbe-glossary.md) represented in Visual Basic for Applications. - **Remarks** + +## Remarks + You can use the following collections to access the objects contained in the **VBE** object: diff --git a/Language/Reference/User-Interface-Help/vbe-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/vbe-property-vba-add-in-object-model.md index 84f798e220a..c8aa316fc16 100644 --- a/Language/Reference/User-Interface-Help/vbe-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/vbe-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns the root of the **VBE** object. Read-only. - **Remarks** + +## Remarks + All objects have a **VBE** property that points to the root of the **VBE** object. diff --git a/Language/Reference/User-Interface-Help/vbnewprojects-collection-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/vbnewprojects-collection-vba-add-in-object-model.md index a1a26a32b67..a446b6ad100 100644 --- a/Language/Reference/User-Interface-Help/vbnewprojects-collection-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/vbnewprojects-collection-vba-add-in-object-model.md @@ -12,7 +12,7 @@ ms.date: 06/08/2017 Represents all of the new projects in the development environment. - **Remarks** +## Remarks Use the **VBNewProjects** collection to access specific projects in an instance of the development environment. **VBNewProjects** is a standard collection that you can iterate through using a **For… Each** block. diff --git a/Language/Reference/User-Interface-Help/vbproject-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/vbproject-object-vba-add-in-object-model.md index c6adda0b0ac..be7f07f915e 100644 --- a/Language/Reference/User-Interface-Help/vbproject-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/vbproject-object-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Represents a [project](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + Use the **VBProject** object to set[properties](../../Glossary/vbe-glossary.md) for the project, to access the **VBComponents** collection, and to access the **References** collection. diff --git a/Language/Reference/User-Interface-Help/vbprojects-collection-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/vbprojects-collection-vba-add-in-object-model.md index 0eaacff2286..deb40e3acf4 100644 --- a/Language/Reference/User-Interface-Help/vbprojects-collection-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/vbprojects-collection-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Represents all the [projects](../../Glossary/vbe-glossary.md) that are open in the[development environment](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + Use the **VBProjects** collection to access specific projects in an instance of the development environment. **VBProjects** is a standard collection that can be used in a **For** **Each** block. diff --git a/Language/Reference/User-Interface-Help/vbprojects-property.md b/Language/Reference/User-Interface-Help/vbprojects-property.md index 029b323f8ab..9e2069fa2a8 100644 --- a/Language/Reference/User-Interface-Help/vbprojects-property.md +++ b/Language/Reference/User-Interface-Help/vbprojects-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Returns the VBProjects collection, which represents all of the projects currently open in the Visual Basic IDE. - **Syntax** - _object_. **VBProjects** + +## Syntax + +_object_. **VBProjects** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. diff --git a/Language/Reference/User-Interface-Help/version-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/version-property-vba-add-in-object-model.md index 7bdd88f4fca..8707debb340 100644 --- a/Language/Reference/User-Interface-Help/version-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/version-property-vba-add-in-object-model.md @@ -14,6 +14,8 @@ ms.date: 06/08/2017 Returns a [String](../../Glossary/vbe-glossary.md) containing the version of Visual Basic for Applications that the application is using. Read-only. - **Remarks** + +## Remarks + The **Version** property value is a string beginning with one or two digits, a period, and two digits; the rest of the string is undefined and may contain text or numbers. diff --git a/Language/Reference/User-Interface-Help/verticalscrollbarside-property.md b/Language/Reference/User-Interface-Help/verticalscrollbarside-property.md index 70747137637..438eaec9e6a 100644 --- a/Language/Reference/User-Interface-Help/verticalscrollbarside-property.md +++ b/Language/Reference/User-Interface-Help/verticalscrollbarside-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies whether a vertical scroll bar appears on the right or left side of a form or page. - **Syntax** - _object_. **VerticalScrollbarSide** [= _fmVerticalScrollbarSide_ ] + +## Syntax + +_object_. **VerticalScrollbarSide** [= _fmVerticalScrollbarSide_ ] The **VerticalScrollbarSide** property syntax has these parts: @@ -35,6 +37,7 @@ The settings for _fmVerticalScrollbarSide_ are: | _fmVerticalScrollbarSideRight_|0|Puts the scroll bar on the right side (default).| | _fmVerticalScrollBarSideLeft_|1|Puts the scroll bar on the left side.| - **Remarks** +## Remarks + The **VerticalScrollBarSide** property is is particularly useful if the form will be used in an environment where reading occurs from right to left. diff --git a/Language/Reference/User-Interface-Help/visible-property-microsoft-forms.md b/Language/Reference/User-Interface-Help/visible-property-microsoft-forms.md index e9d2fc8da4d..b8434e68a62 100644 --- a/Language/Reference/User-Interface-Help/visible-property-microsoft-forms.md +++ b/Language/Reference/User-Interface-Help/visible-property-microsoft-forms.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Specifies whether an object is visible or hidden. - **Syntax** - _object_. **Visible** [= _Boolean_ ] + +## Syntax + +_object_. **Visible** [= _Boolean_ ] The **Visible** property syntax has these parts: @@ -33,7 +35,8 @@ The settings for _Boolean_ are: |**True**|Object is visible (default).| |**False**|Object is hidden.| - **Remarks** +## Remarks + Use the **Visible** property to control access to information without displaying it. For example, you could use the value of a control on a hidden form as the criteria for a query. All controls are visible at [design time](../../Glossary/vbe-glossary.md). diff --git a/Language/Reference/User-Interface-Help/volumename-property.md b/Language/Reference/User-Interface-Help/volumename-property.md index f7b827d5433..dce5e907d04 100644 --- a/Language/Reference/User-Interface-Help/volumename-property.md +++ b/Language/Reference/User-Interface-Help/volumename-property.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Sets or returns the volume name of the specified drive. Read/write. - **Syntax** - _object_. **VolumeName** [= _newname_ ] + +## Syntax + +_object_. **VolumeName** [= _newname_ ] The VolumeName property has these parts: @@ -27,7 +29,8 @@ The VolumeName property has these parts: | _object_|Required. Always the name of a **Drive** object.| | _newname_|Optional. If provided, _newname_ is the new name of the specified _object_.| - **Remarks** +## Remarks + The following code illustrates the use of the **VolumeName** property: diff --git a/Language/Reference/User-Interface-Help/weekday-function.md b/Language/Reference/User-Interface-Help/weekday-function.md index c7d2af2a99a..e196af3f1b5 100644 --- a/Language/Reference/User-Interface-Help/weekday-function.md +++ b/Language/Reference/User-Interface-Help/weekday-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Integer**) containing a whole number representing the day of the week. - **Syntax** - **Weekday(**_date_, [ **_firstdayofweek_** ] **)** + +## Syntax + +**Weekday(**_date_, [ **_firstdayofweek_** ] **)** The **Weekday** function syntax has these[named arguments](../../Glossary/vbe-glossary.md): @@ -53,7 +55,8 @@ The **Weekday** function can return any of these values: |**vbFriday**|6|Friday| |**vbSaturday**|7|Saturday| - **Remarks** +## Remarks + If the **Calendar** property setting is Gregorian, the returned integer represents the Gregorian day of the week for the date argument. If the calendar is Hijri, the returned integer represents the Hijri day of the week for the date argument. For Hijri dates, the argument number is any numeric expression that can represent a date and/or time from 1/1/100 (Gregorian Aug 2, 718) through 4/3/9666 (Gregorian Dec 31, 9999). ## Example diff --git a/Language/Reference/User-Interface-Help/weekdayname-function.md b/Language/Reference/User-Interface-Help/weekdayname-function.md index aabd709c1c2..0b488705975 100644 --- a/Language/Reference/User-Interface-Help/weekdayname-function.md +++ b/Language/Reference/User-Interface-Help/weekdayname-function.md @@ -15,8 +15,10 @@ ms.date: 06/08/2017 **Description** Returns a string indicating the specified day of the week. - **Syntax** - **WeekdayName(**_weekday_**,**_abbreviate_**,**_firstdayofweek_**)** + +## Syntax + +**WeekdayName(**_weekday_**,**_abbreviate_**,**_firstdayofweek_**)** The **WeekdayName** function syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/whatsthisbutton-property.md b/Language/Reference/User-Interface-Help/whatsthisbutton-property.md index 57796626e94..a68750f5b0b 100644 --- a/Language/Reference/User-Interface-Help/whatsthisbutton-property.md +++ b/Language/Reference/User-Interface-Help/whatsthisbutton-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Returns a [Boolean](../../Glossary/vbe-glossary.md) value that determines whether the **What's This** button appears on the title bar of a **UserForm** object. Read-only at[run time](../../Glossary/vbe-glossary.md). This property does not apply to the Macintosh. - **Remarks** + +## Remarks + The settings for the **WhatsThisButton** property are: @@ -25,6 +27,8 @@ The settings for the **WhatsThisButton** property are: |**True**|Turns on display of the **What's This Help** button.| |**False**|(Default) Turns off display of the **What's This Help** button.| - **Remarks** + +## Remarks + The **WhatsThisHelp** property must be **True** for the **WhatsThisButton** property to be **True**. diff --git a/Language/Reference/User-Interface-Help/whatsthishelp-property.md b/Language/Reference/User-Interface-Help/whatsthishelp-property.md index 318962e787b..b95becf3d3b 100644 --- a/Language/Reference/User-Interface-Help/whatsthishelp-property.md +++ b/Language/Reference/User-Interface-Help/whatsthishelp-property.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Returns a [Boolean](../../Glossary/vbe-glossary.md) value that determines whether context-sensitive Help uses the pop-up window provided by Windows 95 Help or the main Help window. Read-only at[run time](../../Glossary/vbe-glossary.md). This property does not apply to the Macintosh. - **Remarks** + +## Remarks + The settings for the **WhatsThisHelp** property are: @@ -25,7 +27,9 @@ The settings for the **WhatsThisHelp** property are: |**True**|The application uses one of the What's This access techniques to start Windows Help and load a topic identified by the **WhatsThisHelpID** property.| |**False**|(Default) The application uses the F1 key to start Windows Help and load the topic identified by the **HelpContextID** property.| - **Remarks** + +## Remarks + There are two access techniques for providing What's This Help in an application. The **WhatsThisHelp** property must be set to **True** for any of these techniques to work. diff --git a/Language/Reference/User-Interface-Help/whatsthismode-method.md b/Language/Reference/User-Interface-Help/whatsthismode-method.md index 08a574912f8..3b5953a3145 100644 --- a/Language/Reference/User-Interface-Help/whatsthismode-method.md +++ b/Language/Reference/User-Interface-Help/whatsthismode-method.md @@ -16,10 +16,14 @@ ms.date: 06/08/2017 Causes the mouse pointer to change to the **What's This** pointer and prepares the application to display Help on a selected object. This method exists on the Macintosh, but there is no pointer functionality. - **Syntax** - _object_. **WhatsThisMode** + +## Syntax + +_object_. **WhatsThisMode** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. If _object_ is omitted, the **UserForm** with the[focus](../../Glossary/vbe-glossary.md) is assumed to be _object_. - **Remarks** + +## Remarks + Executing the **WhatsThisMode** method places the application in the same state as clicking the **What's This** button on the title bar. The mouse pointer changes to the **What's This** pointer. When the user clicks an object, the **WhatsThisHelpID** property of the clicked object is used to invoke the context-sensitive Help. ## Example diff --git a/Language/Reference/User-Interface-Help/whilewend-statement.md b/Language/Reference/User-Interface-Help/whilewend-statement.md index c72e54216bf..02f51ee9f91 100644 --- a/Language/Reference/User-Interface-Help/whilewend-statement.md +++ b/Language/Reference/User-Interface-Help/whilewend-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Executes a series of [statements](../../Glossary/vbe-glossary.md) as long as a given condition is **True**. - **Syntax** +## Syntax - **While**_condition_ +**While**_condition_ [ _statements_ ] **Wend** @@ -27,7 +27,8 @@ The **While...Wend** statement syntax has these parts: | _condition_|Required. [Numeric expression](../../Glossary/vbe-glossary.md) or[string expression](../../Glossary/vbe-glossary.md) that evaluates to **True** or **False**. If _condition_ is[Null](../../Glossary/vbe-glossary.md), _condition_ is treated as **False**.| | _statements_|Optional. One or more statements executed while condition is **True**.| - **Remarks** +## Remarks + If _condition_ is **True**, all _statements_ are executed until the **Wend** statement is encountered. Control then returns to the **While** statement and _condition_ is again checked. If _condition_ is still **True**, the process is repeated. If it is not **True**, execution resumes with the statement following the **Wend** statement. **While...Wend** loops can be nested to any level. Each **Wend** matches the most recent **While**. diff --git a/Language/Reference/User-Interface-Help/width-property-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/width-property-vba-add-in-object-model.md index f9fc6502d54..516ec09fc79 100644 --- a/Language/Reference/User-Interface-Help/width-property-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/width-property-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Returns or sets a [Single](../../Glossary/vbe-glossary.md) containing the width of the window in[twips](../../Glossary/vbe-glossary.md). Read/write. - **Remarks** + +## Remarks + Changing the **Width** property setting of a[linked window](../../Glossary/vbe-glossary.md) or[docked window](../../Glossary/vbe-glossary.md) has no effect as long as the window remains linked or docked. diff --git a/Language/Reference/User-Interface-Help/widthstatement.md b/Language/Reference/User-Interface-Help/widthstatement.md index c445678ef43..43b219a59ab 100644 --- a/Language/Reference/User-Interface-Help/widthstatement.md +++ b/Language/Reference/User-Interface-Help/widthstatement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Assigns an output line width to a file opened using the **Open** statement. - **Syntax** +## Syntax - **Width #**_filenumber_, _width_ +**Width #**_filenumber_, _width_ The **Width #** statement syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/window-object-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/window-object-vba-add-in-object-model.md index a5ced836b91..ab513ffb595 100644 --- a/Language/Reference/User-Interface-Help/window-object-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/window-object-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Represents a window in the [development environment](../../Glossary/vbe-glossary.md). - **Remarks** + +## Remarks + Use the **Window** object to show, hide, or position windows. diff --git a/Language/Reference/User-Interface-Help/windows-collection-vba-add-in-object-model.md b/Language/Reference/User-Interface-Help/windows-collection-vba-add-in-object-model.md index 85839cac1c6..2fb8f7d0bcd 100644 --- a/Language/Reference/User-Interface-Help/windows-collection-vba-add-in-object-model.md +++ b/Language/Reference/User-Interface-Help/windows-collection-vba-add-in-object-model.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Contains all open or permanent windows. - **Remarks** + +## Remarks + Use the **Windows** collection to access **Window** objects. The **Windows** collection has a fixed set of windows that are always available in the[collection](../../Glossary/vbe-glossary.md), such as the [Project window](../../Glossary/vbe-glossary.md), the [Properties window](../../Glossary/vbe-glossary.md), and a set of windows that represent all open code windows and [designer](../../Glossary/vbe-glossary.md) windows. Opening a code or designer window adds a new member to the **Windows** collection. Closing a code or designer window removes a member from the **Windows** collection. Closing a permanent[development environment](../../Glossary/vbe-glossary.md) window doesn't remove the corresponding object from this collection, but results in the window not being visible. diff --git a/Language/Reference/User-Interface-Help/windows-property.md b/Language/Reference/User-Interface-Help/windows-property.md index 7e3f1eb4d87..295cabfa219 100644 --- a/Language/Reference/User-Interface-Help/windows-property.md +++ b/Language/Reference/User-Interface-Help/windows-property.md @@ -13,7 +13,9 @@ ms.date: 06/08/2017 Returns the **Window** object, which represents a window in the Visual Basic IDE. - **Syntax** - _object_. **Window** + +## Syntax + +_object_. **Window** The _object_ placeholder represents an[object expression](../../Glossary/vbe-glossary.md) that evaluates to an object in the Applies To list. diff --git a/Language/Reference/User-Interface-Help/with-statement.md b/Language/Reference/User-Interface-Help/with-statement.md index 27c3b18946b..a411825a4d3 100644 --- a/Language/Reference/User-Interface-Help/with-statement.md +++ b/Language/Reference/User-Interface-Help/with-statement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Executes a series of [statements](../../Glossary/vbe-glossary.md) on a single object or a [user-defined type](../../Glossary/vbe-glossary.md). - **Syntax** +## Syntax - **With**_object_ +**With**_object_ [ _statements_ ] **End With** @@ -27,7 +27,8 @@ The **With** statement syntax has these parts: | _object_|Required. Name of an object or a user-defined type.| | _statements_|Optional. One or more statements to be executed on _object_.| - **Remarks** +## Remarks + The **With** statement allows you to perform a series of statements on a specified object without requalifying the name of the object. For example, to change a number of different[properties](../../Glossary/vbe-glossary.md) on a single object, place the property assignment statements within the **With** control structure, referring to the object once instead of referring to it with each property assignment. The following example illustrates use of the **With** statement to assign values to several properties of the same object. diff --git a/Language/Reference/User-Interface-Help/wordwrap-property.md b/Language/Reference/User-Interface-Help/wordwrap-property.md index c58e6abb6db..c0e52429314 100644 --- a/Language/Reference/User-Interface-Help/wordwrap-property.md +++ b/Language/Reference/User-Interface-Help/wordwrap-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Indicates whether the contents of a control automatically wrap at the end of a line. - **Syntax** - _object_. **WordWrap** [= _Boolean_ ] + +## Syntax + +_object_. **WordWrap** [= _Boolean_ ] The **WordWrap** property syntax has these parts: @@ -35,6 +37,7 @@ The settings for _Boolean_ are: |**True**|The text wraps (default).| |**False**|The text does not wrap.| - **Remarks** +## Remarks + For controls that support the **MultiLine** property as well as the **WordWrap** property, **WordWrap** is ignored when **MultiLine** is **False**. diff --git a/Language/Reference/User-Interface-Help/write-method.md b/Language/Reference/User-Interface-Help/write-method.md index 26dfc3a6b4b..c3fe4cef27b 100644 --- a/Language/Reference/User-Interface-Help/write-method.md +++ b/Language/Reference/User-Interface-Help/write-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Writes a specified string to a **TextStream** file. - **Syntax** - _object_. **Write(**_string_**)** + +## Syntax + +_object_. **Write(**_string_**)** The **Write** method syntax has these parts: @@ -27,6 +29,7 @@ The **Write** method syntax has these parts: | _object_|Required. Always the name of a **TextStream** object.| | _string_|Required. The text you want to write to the file.| - **Remarks** +## Remarks + Specified strings are written to the file with no intervening spaces or characters between each string. Use the **WriteLine** method to write a newline character or a string that ends with a newline character. diff --git a/Language/Reference/User-Interface-Help/writeblanklines-method.md b/Language/Reference/User-Interface-Help/writeblanklines-method.md index 1cc9cdf198d..71de59d774a 100644 --- a/Language/Reference/User-Interface-Help/writeblanklines-method.md +++ b/Language/Reference/User-Interface-Help/writeblanklines-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Writes a specified number of newline characters to a **TextStream** file. - **Syntax** - _object_. **WriteBlankLines(**_lines_**)** + +## Syntax + +_object_. **WriteBlankLines(**_lines_**)** The **WriteBlankLines** method syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/writeline-method.md b/Language/Reference/User-Interface-Help/writeline-method.md index da185690999..eba81a8b151 100644 --- a/Language/Reference/User-Interface-Help/writeline-method.md +++ b/Language/Reference/User-Interface-Help/writeline-method.md @@ -17,8 +17,10 @@ ms.date: 06/08/2017 **Description** Writes a specified string and newline character to a **TextStream** file. - **Syntax** - _object_. **WriteLine(** [ _string_ ] **)** + +## Syntax + +_object_. **WriteLine(** [ _string_ ] **)** The **WriteLine** method syntax has these parts: diff --git a/Language/Reference/User-Interface-Help/writestatement.md b/Language/Reference/User-Interface-Help/writestatement.md index 228db7f8e5c..30038098633 100644 --- a/Language/Reference/User-Interface-Help/writestatement.md +++ b/Language/Reference/User-Interface-Help/writestatement.md @@ -13,9 +13,9 @@ ms.date: 06/08/2017 Writes data to a sequential file. - **Syntax** +## Syntax - **Write #**_filenumber_, [ _outputlist_ ] +**Write #**_filenumber_, [ _outputlist_ ] The **Write #** statement syntax has these parts: @@ -25,7 +25,8 @@ The **Write #** statement syntax has these parts: | _filenumber_|Required. Any valid [file number](../../Glossary/vbe-glossary.md).| | _outputlist_|Optional. One or more comma-delimited [numeric expressions](../../Glossary/vbe-glossary.md) or[string expressions](../../Glossary/vbe-glossary.md) to write to a file.| - **Remarks** +## Remarks + Data written with **Write #** is usually read from a file with **Input #**. If you omit _outputlist_ and include a comma after _filenumber_, a blank line is printed to the file. Multiple expressions can be separated with a space, a semicolon, or a comma. A space has the same effect as a semicolon. When **Write #** is used to write data to a file, several universal assumptions are followed so the data can always be read and correctly interpreted using **Input #**, regardless of[locale](../../Glossary/vbe-glossary.md): diff --git a/Language/Reference/User-Interface-Help/xor-operator.md b/Language/Reference/User-Interface-Help/xor-operator.md index deacacee00f..dabf5ca4f45 100644 --- a/Language/Reference/User-Interface-Help/xor-operator.md +++ b/Language/Reference/User-Interface-Help/xor-operator.md @@ -14,7 +14,9 @@ ms.date: 06/08/2017 Used to perform a logical exclusion on two [expressions](../../Glossary/vbe-glossary.md). - **Syntax** + +## Syntax + [ _result_**=** ] _expression1_ **Xor** _expression2_ The **Xor** operator syntax has these parts: @@ -25,7 +27,8 @@ The **Xor** operator syntax has these parts: | _expression1_|Required; any expression.| | _expression2_|Required; any expression.| - **Remarks** +## Remarks + If one, and only one, of the expressions evaluates to **True**, _result_ is **True**. However, if either expression is [Null](../../Glossary/vbe-glossary.md), _result_ is also **Null**. When neither expression is **Null**, _result_ is determined according to the following table: diff --git a/Language/Reference/User-Interface-Help/year-function.md b/Language/Reference/User-Interface-Help/year-function.md index 21751fd5d4b..dde8afad0ea 100644 --- a/Language/Reference/User-Interface-Help/year-function.md +++ b/Language/Reference/User-Interface-Help/year-function.md @@ -14,8 +14,10 @@ ms.date: 06/08/2017 Returns a **Variant** (**Integer**) containing a whole number representing the year. - **Syntax** - **Year(**_date_**)** + +## Syntax + +**Year(**_date_**)** The required _date_[argument](../../Glossary/vbe-glossary.md) is any[Variant](../../Glossary/vbe-glossary.md), [numeric expression](../../Glossary/vbe-glossary.md), [string expression](../../Glossary/vbe-glossary.md), or any combination, that can represent a date. If _date_ contains[Null](../../Glossary/vbe-glossary.md), **Null** is returned. **Note** If the **Calendar** property setting is Gregorian, the returned integer represents the Gregorian year for the date argument. If the calendar is Hijri, the returned integer represents the Hijri year for the date argument. For Hijri dates, the argument number is any numeric expression that can represent a date and/or time from 1/1/100 (Gregorian Aug 2, 718) through 4/3/9666 (Gregorian Dec 31, 9999). diff --git a/Language/Reference/User-Interface-Help/zoom-event.md b/Language/Reference/User-Interface-Help/zoom-event.md index 593b2386e8b..a3626a8c54a 100644 --- a/Language/Reference/User-Interface-Help/zoom-event.md +++ b/Language/Reference/User-Interface-Help/zoom-event.md @@ -16,7 +16,9 @@ ms.date: 06/08/2017 Occurs when the value of the **Zoom** property changes. - **Syntax** + +## Syntax + For Frame **Private Sub**_object_ _**Zoom(**_Percent_**As Integer)** For MultiPage **Private Sub**_object_ _**Zoom(**_index_**As Long**, _Percent_**As Integer)** The **Zoom** event syntax has these parts: @@ -28,7 +30,8 @@ The **Zoom** event syntax has these parts: | _index_|Required. The index of the page in a **MultiPage** associated with this event.| | _Percent_|Required. The percentage the form is to be zoomed. Valid values range from 10 percent to 400 percent.| - **Remarks** +## Remarks + The value of the **Zoom** property identifies how the size of the form or **Page** changes. The value of the property indicates how the size of the control should change relative to its current size. Values less than 100 reduce the displayed size of the form; values greater than 100 increase the displayed size of the form. You can set this property to any integer from 10 to 400. diff --git a/Language/Reference/User-Interface-Help/zoom-property.md b/Language/Reference/User-Interface-Help/zoom-property.md index 57bbbf7078a..cbb69580e54 100644 --- a/Language/Reference/User-Interface-Help/zoom-property.md +++ b/Language/Reference/User-Interface-Help/zoom-property.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Specifies how much to change the size of a displayed object. - **Syntax** - _object_. **Zoom** [= _Integer_ ] + +## Syntax + +_object_. **Zoom** [= _Integer_ ] The **Zoom** property syntax has these parts: @@ -26,6 +28,7 @@ The **Zoom** property syntax has these parts: | _object_|Required. A valid object.| | _Integer_|Optional. The percentage to increase or decrease the displayed image.| - **Remarks** +## Remarks + The value of the **Zoom** property specifies a percentage of image enlargement or reduction by which an image display should change. Values from 10 to 400 are valid. The value specified is a percentage of the object's original size; thus, a setting of 400 means you want to enlarge the image to four times its original size (or 400 percent), while a setting of 10 means you want to reduce the image to one-tenth of its original size (or 10 percent). diff --git a/Language/Reference/User-Interface-Help/zorder-method.md b/Language/Reference/User-Interface-Help/zorder-method.md index aee153d7baf..6034eb22a06 100644 --- a/Language/Reference/User-Interface-Help/zorder-method.md +++ b/Language/Reference/User-Interface-Help/zorder-method.md @@ -16,8 +16,10 @@ ms.date: 06/08/2017 Places the object at the front or back of the [z-order](../../Glossary/vbe-glossary.md). - **Syntax** - _object_. **ZOrder(** [ _zPosition_ ] **)** + +## Syntax + +_object_. **ZOrder(** [ _zPosition_ ] **)** The **ZOrder** method syntax has these parts: @@ -35,7 +37,8 @@ The settings for _zPosition_ are: | _fmTop_|0|Places the control at the front of the z-order. The control appears on top of other controls (default).| | _fmBottom_|1|Places the control at the back of the z-order. The control appears underneath other controls.| - **Remarks** +## Remarks + The z-order determines how windows and controls are stacked when they are presented to the user. Items at the back of the z-order are overlaid by closer items; items at the front of the z-order appear to be on top of items at the back. When the _zPosition_ argument is omitted, the object is brought to the front. In [design mode](../../Glossary/vbe-glossary.md), the Bring to Front or Send To Back commands set the z-order. Bring to Front is equivalent to using the **ZOrder** method and putting the object at the front of the z-order. Send to Back is equivalent to using **ZOrder** and putting the object at the back of the z-order. This method does not affect content or sequence of the controls in the **Controls** collection. diff --git a/Office-Mac/GrantAccessToMultipleFiles.md b/Office-Mac/GrantAccessToMultipleFiles.md index e6a2924f1d0..e97c9b2e940 100644 --- a/Office-Mac/GrantAccessToMultipleFiles.md +++ b/Office-Mac/GrantAccessToMultipleFiles.md @@ -31,9 +31,9 @@ The command returns whether the user granted permission or not. |True|The user grants permission to the files.| |False|The user denies permission to the files.| -**Note:** After the user grants permissions, the permissions are stored with the app. The user doesn’t need to grant permission to the file again. +**Note:** After the user grants permissions, the permissions are stored with the app. The user doesn’t need to grant permission to the file again. -**Example** +## Example ```vb Sub requestFileAccess()  diff --git a/access/Concepts/Miscellaneous/required-client-settings.md b/access/Concepts/Miscellaneous/required-client-settings.md index 0f664182de4..6c06a351949 100644 --- a/access/Concepts/Miscellaneous/required-client-settings.md +++ b/access/Concepts/Miscellaneous/required-client-settings.md @@ -22,7 +22,9 @@ Specify the following settings to use a custom **DataFactory** handler. - Specify the name of the handler to use in the RDS.DataControl object's **Handler** property, or the **Recordset** object's connection string " **Handler=** " keyword. (You cannot set the handler in the **Connection** object connect string.) RDS provides a default handler on the server named **MSDFMAP.Handler**. (The default customization file is named **MSDFMAP.INI**.) - **Example** + +## Example + Assume that the following sections in **MSDFMAP.INI** and the data source name, AdvWorks, have been previously defined: diff --git a/word/Concepts/Objects-Properties-Methods/understanding-objects-properties-and-methods.md b/word/Concepts/Objects-Properties-Methods/understanding-objects-properties-and-methods.md index 3ca112fdccc..c12b274f1f6 100644 --- a/word/Concepts/Objects-Properties-Methods/understanding-objects-properties-and-methods.md +++ b/word/Concepts/Objects-Properties-Methods/understanding-objects-properties-and-methods.md @@ -50,7 +50,7 @@ End Sub In this example, `ActiveDocument` refers to the document in the active window in Word. The name of that document is assigned to the variable refers to the document in the active window in Word. The name of that document is assigned to the variable `strDocName`. -**Remarks** +## Remarks The Help topic for each property indicates whether you can set that property (read/write), only read the property (read-only), or only write the property (write-only). Also, the Object Browser in the Visual Basic Editor displays the read/write status at the bottom of the browser window when the property is selected.