There has to be a better way...
This is what I came up with to get a msgbox to read "This program was only meant to be a demo." There must be a better way of doing this than what I am doing now. It just seems like this a lot of work just for one string how would I do multiple strings?
Is a resource file with a string table better? How secure is that resource file?
Code:
Option Explicit
Sub Main()
Dim MyStr() As Variant
MyStr = Array(84, 104, 105, 115, 32, 112, 114, 111, 103, 114, 97, 109, 32, 119, 97, 115, _
32, 111, 110, 108, 121, 32, 109, 101, 110, 116, 32, 116, 111, 32, 98, 101, _
32, 97, 32, 100, 101, 109, 111, 46)
Call MsgBox(GetString(MyStr))
End Sub
Public Function GetString(InputString As Variant) As String
Dim i As Integer
For i = LBound(InputString) To UBound(InputString)
GetString = GetString & Chr(InputString(i))
Next i
End Function
Thanks for the help again.