Skip to content

Commit

Permalink
Format Section headers (#48)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Kagre authored and Linda Caputo committed Aug 22, 2018
1 parent 82078e8 commit 54e0a75
Show file tree
Hide file tree
Showing 617 changed files with 3,253 additions and 1,592 deletions.
9 changes: 6 additions & 3 deletions Language/Concepts/Forms/passwordchar-property.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand All @@ -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.

10 changes: 7 additions & 3 deletions Language/Concepts/Getting-Started/deftype-statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_ ] **. . .**
Expand All @@ -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:


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_**)**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ 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:


|**Part**|**Description**|
|:-----|:-----|
| _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.

Original file line number Diff line number Diff line change
Expand Up @@ -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.

Original file line number Diff line number Diff line change
Expand Up @@ -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**.

Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand All @@ -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.

Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):


Expand All @@ -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.

Expand Down
7 changes: 5 additions & 2 deletions Language/Reference/User-Interface-Help/addcontrol-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions Language/Reference/User-Interface-Help/addcustom-method.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand Down
9 changes: 6 additions & 3 deletions Language/Reference/User-Interface-Help/addfolders-method.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand All @@ -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.

Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand All @@ -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.

Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand All @@ -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.

Original file line number Diff line number Diff line change
Expand Up @@ -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.

10 changes: 7 additions & 3 deletions Language/Reference/User-Interface-Help/addin-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Original file line number Diff line number Diff line change
Expand Up @@ -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.

6 changes: 4 additions & 2 deletions Language/Reference/User-Interface-Help/addins-property.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Loading

0 comments on commit 54e0a75

Please sign in to comment.