Question : Write HEX

I need to write a HEX value to a file (random open with records size of 1 (string)).
When I examine the file using HEX editor - the value I want to write has a (hex) value of 80.
The file is changed and I want to PUT this value back. Therefore, I want to replace the current value with this value of (hex) 80.
Is this simply  {myType} = (&H80) ??
Thanks
Scott C

Answer : Write HEX

Yes, But you don't need the parentheses:
{myType} = &H80

VBA data type-declaration characters:
Number (base 10): No type-declaration character needed (the number will automatically be converted to the type needed)
example: 1234, 67.77

REQUIRED data type-declaration characters:
String: Bracket with quotation marks or apostrophes (REQUIRED)
example: "This is a string" or 'this is a string'

date/time: Bracket with pound signs (REQUIRED)
example: #6/1/1947#, #June 17, 1999#, #3:30Pm#, #1/5/63 2:33#

Hexadecimal number: Precede with &h
example: &H10

0ctal number: Precede with &o
example: &O10

optional, explicitly specified data type-declaration characters:
Integer: Append with percent sign
example: 1234%

Long: Append with ampersand  
example: 67877768&

Currency: Append with at sign
example: 62.45@

Single: Append with exclamation point  
example: 123.777!, 67.00!

Double: Append with number sign
example: 677767.8888#
Random Solutions  
 
programming4us programming4us