Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 68
  • Last Modified:

John, do you have a function to change the pairs back to text?

I had this question after viewing I need to convert a string into a string of decimals.
0
CRB1609
Asked:
CRB1609
2 Solutions
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
If you have used his TextToPair function it could by done as follows:
Public Function PairToText(InputString As String) As String
Dim tmpOutput As String
Dim strLen As Integer
Dim counter As Integer
strLen = Len(InputString)
For counter = 1 To strLen Step 2
tmpOutput = tmpOutput & CHR(CInt(Mid(InputString, counter, 2)) + 50)
Next
Debug.Print tmpOutput
PairToText = tmpOutput
End Function

Open in new window


Note that I've used 50 as value to add but if you used 30 as suggested in that q. you must change the value here too
tmpOutput = tmpOutput & CHR(CInt(Mid(InputString, counter, 2)) + 30)<---
0
 
John TsioumprisSoftware & Systems EngineerCommented:
Just follow the code above...but i would insist on the custom mappings...more secure and better to handle...
1
 
CRB1609Author Commented:
Thank you both, very much.

Clive
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now