Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Qword To Byte In HEX

Posted on 2003-11-23
1
924 Views
Last Modified: 2008-01-16
I'm checking a checkSum value of a Protocol.

During that check i need to comper two values and see if they are the same.

Value1, Value2 are as long.

Value1 = 22500

Value2 = 228

Hex(Value1) will retern 57E4

and

Hex(Value2) will retern E4

They are the same, only Value1 is in Qword and i need only the Byte (E4).


How can i do the convertion from 22500 => &HE4

10X.





0
Comment
Question by:RivKin
1 Comment
 
LVL 4

Accepted Solution

by:
TigerZhao earned 500 total points
ID: 9807821
Function ByteHex(Byval LongVal As Long) As String
    ByteHex = Right$("0" & Hex(LongVal), 2)
End Function
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

856 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