By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,179 Members | 2,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,179 IT Pros & Developers. It's quick & easy.

Conversion of ASCII hex number to decimal conversion

P: 5
I want to convert ASCII hex number to decimal conversion.

For Example :

1: F01A is converted into Decimal: 61466
2: FFFC64F0 is converted into Decimal: 4294730992

What is the best way to create a smaller function for the above like conversion.

Pls.send me the complete function
Oct 19 '08 #1
Share this Question
Share on Google+
4 Replies


debasisdas
Expert 5K+
P: 8,127
you need to use DEC for the purpose.

msgbox dec(&HFFFC64F0)
Oct 19 '08 #2

P: 5
Thanks for your reply.

I tried as per your suggestion, But it gives error as Dec is not SUB or Function not defined.

Now Pls. Help me.



you need to use DEC for the purpose.

msgbox dec(&HFFFC64F0)
Oct 20 '08 #3

QVeen72
Expert 100+
P: 1,445
Hi,

Prefix the Hex Number with "&H", that way VB understands, its a Hex number..
and Get the Decimal Equivalent using CDEC function :

Expand|Select|Wrap|Line Numbers
  1. MsgBox CDEC("&HF01A")
  2.  
Regards
Veena
Oct 21 '08 #4

P: 5
Hi,

Prefix the Hex Number with "&H", that way VB understands, its a Hex number..
and Get the Decimal Equivalent using CDEC function :

Expand|Select|Wrap|Line Numbers
  1. MsgBox CDEC("&HF01A")
  2.  
Regards
Veena
Thanks for your affort.

Yes, it will work for values less then 7FFFFFFF. But what after that?

But, Now no need to worry. I had solve the problem.

Again Thanking you.
Oct 23 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.