How to make the value of every array outside of the range "00"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Camelot
    New Member
    • Dec 2007
    • 1

    How to make the value of every array outside of the range "00"

    Code:
    Private Sub cmdDone_Click()
    
    Dim strAryWords() As String
    Dim strValue
    Dim num As Integer
    strValue = hexstring(txtInput.Text)
    strAryWords = Split(strValue, " ")
    num = UBound(strAryWords) + 1
    
    txtImposter.Text = "206b7f64 20202020" _
            & vbCrLf & "206b7f68 " & strAryWords(4) & strAryWords(3) & strAryWords(2) & strAryWords(1) _
            & vbCrLf & "206b7f6c " & strAryWords(8) & strAryWords(7) & strAryWords(6) & strAryWords(5) _
            & vbCrLf & "206b7f70 " & strAryWords(12) & strAryWords(11) & strAryWords(10) & strAryWords(9) _
            & vbCrLf & "206b7f74 " & strAryWords(16) & strAryWords(15) & strAryWords(14) & strAryWords(13) _
            & vbCrLf & "206b7f78 " & strAryWords(20) & strAryWords(19) & strAryWords(18) & strAryWords(17) _
            & vbCrLf & "206b7f7c " & strAryWords(24) & strAryWords(23) & strAryWords(22) & strAryWords(21) _
            & vbCrLf & "206b7f80 " & strAryWords(28) & strAryWords(27) & strAryWords(26) & strAryWords(25) _
            & vbCrLf & "206b7f84 " & strAryWords(32) & strAryWords(31) & strAryWords(30) & strAryWords(29) _
            & vbCrLf & "206b7f88 " & strAryWords(36) & strAryWords(35) & strAryWords(34) & strAryWords(33) _
            & vbCrLf & "206b7f8c " & strAryWords(40) & strAryWords(39) & strAryWords(38) & strAryWords(37)
    
    End Sub
    I want to make every array that wasn't found with the split function to be = "00"

    How do i do that?
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Not Clear with your Question..
    You want to Make an Array element ="00" if it is blank...?
    If Yes, Just Loop through all the array elements and Check for blank.

    Regards
    Veena

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Yes, can you please explain what you mean when you say an element "wasn't found"?

      Comment

      Working...