Solved

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

Posted on 2007-11-20
2
488 Views
Last Modified: 2012-08-14
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
Comment
Question by:rogerkirk
2 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 20323583
Don't use the Format function. You will get the desired result.

String = Hex(Value)

Kevin
0
 

Author Closing Comment

by:rogerkirk
ID: 31410233
Thank you!  Thank you!  Thank you!  
Production may now resume!  I can enjoy Thanksgiving!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now