In support of this Thread
http://www.eileenslounge.com/viewtopic.php?f=30&t=35600
Code:
Sub MakeSomeStringsToCopyAndPasteIntoACode()
Dim CodeText As String
Dim Cnt As Long
Rem 1 For an ASCII array from Split
'1a) Spaces : Note: PROBLEM* If you use the Split way, then best is to avoid using a single character as the separator. Otherwise you may have problems if you want that character in your Horizontal Array of ASCII characters because it will be seen as a separator for Split. This means that you will not get that character in your list. Instead you will have 2 extra empty elements in your array, and all characters after where the character ( here the space) should have been will appear offset by one place to the right in the horizontal array
For Cnt = 1 To 200
Let CodeText = CodeText & " & "" "" & ChrW(" & Cnt & ")"
Next Cnt
Let CodeText = Mid(CodeText, 10) ' take of first 9 bits of Space&Space"Space"Space&Space
Debug.Print CodeText
Debug.Print
Let CodeText = "" ' Empty so that i can use the varable again below
'1b) Use any 2 characters as the seperator to avoid PROBLEM*
For Cnt = 1 To 200
Let CodeText = CodeText & " & ""Sp"" & ChrW(" & Cnt & ")"
Next Cnt
Let CodeText = Mid(CodeText, 11) ' take of first 10 bits of Space&Space"Sp"Space&Space
Debug.Print CodeText
Debug.Print
Rem 2 For ASCII array from VBA Array( ) function
Let CodeText = "" ' Empty so that i can use the varable again below
For Cnt = 1 To 200
Let CodeText = CodeText & ", ChrW(" & Cnt & ")"
Next Cnt
Let CodeText = Mid(CodeText, 3) ' take off the first two characters " ,"
Debug.Print CodeText
Debug.Print
End Sub
' http://www.eileenslounge.com/viewtopic.php?f=30&t=35600
Bookmarks