Solved

Return Value

Posted on 2009-07-16
3
146 Views
Last Modified: 2012-05-07
I have a value of 0 and i want to convert it to Hex 0x00 how can I do this if I use the below method I will return a 30 in hex which is 0 however i want it to be null

 Public MM_UC_Lenght_MSB As String = "0"
MM_UC_Lenght_MSB = Strings.Asc(MM_UC_Lenght_MSB)
            MM_UC_Lenght_MSB = Conversion.Hex(MM_UC_Lenght_MSB)
            MM_Configuration_Data_Array.Add(MM_UC_Lenght_MSB)
0
Comment
Question by:cmdolcet
[X]
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
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 500 total points
ID: 24871440
Hello cmdolcet

Try using the VB vbNullChar constant.

Regards,

mwvisa1
Public MM_UC_Lenght_MSB As String = vbNullChar
MM_UC_Lenght_MSB = Strings.Asc(MM_UC_Lenght_MSB) 
MM_UC_Lenght_MSB = Conversion.Hex(MM_UC_Lenght_MSB) 
MM_Configuration_Data_Array.Add(MM_UC_Lenght_MSB)

Open in new window

0
 

Author Comment

by:cmdolcet
ID: 24873194
mwvisa1, what happen if i get the character ACK how do i represent it?
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 24873423
ACK has a decimal value in ASCII of 6 if I am not mistaken, so would be like this: Chr(6).
Similarly, you can set other values based on their char int value using the Chr() function.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

627 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