Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 499
  • Last Modified:

Visual Basic Formatting Hex(number) to String - Dropping Characters

Debugging a program written by someone else (not available)  The following statement yields different results depending on the decimal number:    String = Format(Hex(integer))

If the integer = 3342528 then String = 0x3300C0
If the Integer = 3342544 then String = 0x3300 , not 0x3300D0 as expected.

Why?
0
rogerkirk
Asked:
rogerkirk
1 Solution
 
zorvek (Kevin Jones)ConsultantCommented:
Don't use the Format function. You will get the desired result.

String = Hex(Value)

Kevin
0
 
rogerkirkAuthor Commented:
Thank you!  Thank you!  Thank you!  
Production may now resume!  I can enjoy Thanksgiving!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now