Hi all,
i have a trouble convert Text (have form of Hex already e.g 05 07 3F 04. ..) to Hex then i can calculate those number to draw graph with them.

many thanks for any help or instructions!

Okay, those doublets, doubles, pairs of characters are already in hex notation. To retrieve their values, put &h in front of them...

Dim Value As String
Value = "FF"
debug.print CByte("&h" & Value)
debug.Print CInt("&h" & Value & Value) 'actually returns -1 so use clng
debug.Print CLng("&h" & Value & Value & Value)
debug.Print CLng("&h" & Value & Value & Value & Value) 'returns -1 so use cdbl

Good Luck

hi there, thank you for your reply. i found another way that's more simple. because it's unnecessary to be Hex number, decimal is just fine. so this is my solution :

Dim s As String ' e.g 05 04 F4 ...
Dim i As Integer = Convert.ToInt32(Trim(s),16)

Best regards!

Well for future reference there real, you are in the wrong forum. You need to be in the vb.net forum...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.