XL.Format.SetAlignV
-------------------

Sets the vertical alignment.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [3.5](newinversion35.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.Format.SetAlignV"; Book; Format; Value ) 

**MBS**( **"XL.Format.SetAlignV";** /\* Sets the vertical alignment. \*/  
**$Book**; /\* The reference number for the workbook.e.g. $ref \*/   
**$Format**; /\* The index of the format in the book to target.e.g. 0 \*/   
**$Value**) /\* The new setting. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Book | The reference number for the workbook. | $ref |
| Format | The index of the format in the book to target. | 0 |
| Value | The new setting. | $value |

### Result

Returns OK or error.

### Description

Sets the vertical alignment.  
Possible values:  
| 0 | Top |
|--:|---|
| 1 | Center |
| 2 | Bottom |
| 3 | Justify |
| 4 | Distributed |

### Examples

Create left aligned format with specific font:

 #create a font   
Set Variable \[$textFont ; Value:MBS ( "[XL.Book.AddFont](XLBookAddFont.md)"; $book )\]  
Set Variable \[$r ; Value:MBS ( "[XL.Font.SetSize](XLFontSetSize.md)"; $book ; $textfont ; 8)\]  
Set Variable \[$r ; Value:MBS ( "[XL.Font.SetName](XLFontSetName.md)"; $book ; $textfont ; "Century Gothic")\]  
\#create format   
Set Variable \[$textFormat ; Value:MBS ( "[XL.Book.AddFormat](XLBookAddFormat.md)"; $book )\]  
Set Variable \[$r ; Value:MBS ( "[XL.Format.SetFont](XLFormatSetFont.md)"; $book ; $textFormat ; $textFont )\]  
Set Variable \[$r ; Value:MBS ( "[XL.Format.SetAlignH](XLFormatSetAlignH.md)"; $book ; $textFormat ; 1) // left\]  
Set Variable \[$r ; Value:MBS ( "XL.Format.SetAlignV"; $book ; $textFormat ; 0) // top \]  
### See also

- [XL.Book.AddFont](XLBookAddFont.md)
- [XL.Book.AddFormat](XLBookAddFormat.md)
- [XL.Font.SetName](XLFontSetName.md)
- [XL.Font.SetSize](XLFontSetSize.md)
- [XL.Format.GetAlignH](XLFormatGetAlignH.md)
- [XL.Format.GetAlignV](XLFormatGetAlignV.md)
- [XL.Format.SetAlignH](XLFormatSetAlignH.md)
- [XL.Format.SetFont](XLFormatSetFont.md)
- [XL.Format.SetIndent](XLFormatSetIndent.md)

### Example Databases

- [XL/Writing data](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/XL/Writing%20data.shtml#5ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 19th October 2021

  
[XL.Format.SetAlignH](XLFormatSetAlignH.md) - [XL.Format.SetBorder](XLFormatSetBorder.md)

[HTML Version](XLFormatSetAlignV.shtml)