Skip to content

Commit 49c1a92

Browse files
author
Linda Caputo
authored
Merge pull request MicrosoftDocs#386 from italicize/patch-1
Add the numerical limits of the Hex function
2 parents 10516da + 3341cd5 commit 49c1a92

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Language/Reference/User-Interface-Help/hex-function.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,26 @@ Returns a [String](../../Glossary/vbe-glossary.md#string-data-type) representing
1818
## Syntax
1919

2020
**Hex** ( _number_ )
21-
The required _number_ [argument](../../Glossary/vbe-glossary.md#argument) is any valid [numeric expression](../../Glossary/vbe-glossary.md#numeric-expression) or [string expression](../../Glossary/vbe-glossary.md#string-expression) _._
22-
23-
## Remarks
24-
25-
If _number_ is not already a whole number, it is rounded to the nearest whole number before being evaluated.
2621

22+
The required _number_ [argument](../../Glossary/vbe-glossary.md#argument) is any valid [numeric expression](../../Glossary/vbe-glossary.md#numeric-expression) or [string expression](../../Glossary/vbe-glossary.md#string-expression).
2723

2824
|**If _number_ is**|**Hex returns**|
2925
|:-----|:-----|
26+
|-2,147,483,648 to 2,147,483,647|Up to eight hexadecimal characters|
3027
|[Null](../../Glossary/vbe-glossary.md#null)|Null|
3128
|[Empty](../../Glossary/vbe-glossary.md#empty)|Zero (0)|
32-
|Any other number|Up to eight hexadecimal characters|
3329

34-
You can represent hexadecimal numbers directly by preceding numbers in the proper range with `&;H.` For example, For example, `&;H10` represents decimal 16 in hexadecimal notation.
30+
31+
## Remarks
32+
33+
If _number_ is not a whole number, it is rounded to the nearest whole number before being evaluated.
34+
35+
For the opposite of **Hex**, precede a hexidecimal value with **&H**. For example, `Hex(255)` returns the string FF and `&HFF` returns the number 255.
36+
3537

3638
## Example
3739

38-
This example uses the **Hex** function to return the hexadecimal value of a number.
40+
This example uses the **Hex** function to return the hexadecimal value of a number.
3941

4042

4143
```vb

0 commit comments

Comments
 (0)