[AccessD] defining constants as hex numbers

MartyConnelly martyconnelly at shaw.ca
Sun Nov 2 19:43:47 CST 2003


Sub ones()
Dim iTest As Integer
Dim inum As Integer
Dim lnum As Long
Dim hexvalue As String
hexvalue = "8A"
iTest = 255
inum = Val("&H" & hexvalue) ' hex 8A
lnum = inum Xor iTest
Debug.Print "lnum=" & lnum & "hex=" & Hex(lnum)
 
End Sub

John Colby wrote:

>how do you force VB to consider a number hex?  I thought there was something
>like h0f but I can't get it to work and NOT help isn't.
>
>John W. Colby
>www.colbyconsulting.com
>
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada





More information about the AccessD mailing list