<< Prev        Next >>

ID : 279

Hex

Function

To return a numeric value by string type data in hexadecimal.

Syntax

Hex(formula)

Guaranteed entry

Formula
Designate by integer type data.

Return value

Return string type data.

Description

A numeric value is returned by string type data in hexadecimal.

Related Terms

Bin, SprintF

 

Attention

-

Example

'!TITLE "Acquiring Value Converted from Decimal to Hexadecimal as String"
' Convert a decimal value 200 into a hexadecimal value
Sub Sample_Hex

  Dim aaa As Integer
  Dim bbb As String

  aaa = 200

  ' Convert 200 into hexadecimal value and assign to bbb
  bbb = Hex( aaa )

  ' Display "C8" on the message output window
  PrintDbg bbb

End Sub

  Debug.Print Hex(1000) '"3E8."
  Debug.Print Hex(-2) '"FFFE."
	

ID : 279

<< Prev        Next >>