Results 1 to 2 of 2

Thread: save array data as a text file of 65 characters lines

  1. #1
    Guest

    Post

    Um Ubound(M) 'where M() is an array of bytes.
    To save content of M as a text file where lines are 34 characters each(the last one will be 34 chrs or less), I can write the following code:

    Open MyFile For Binary As #1
    rew = StrConv(M, vbUnicode)
    For i = 0 To (Um + 1) \ 34 - 1
    Put #1, , Mid(rew, i * 34 + 1, 34) & _ vbCrLf
    Next i
    Put #1, , Right(rew, Len(rew) Mod 34)
    Close #1

    AY mentionned the CopyMemory function but I can't make it work if original data is contained in an array

    thank you

  2. #2
    Guest

    Post

    title wrong yaz; look better at what you write !
    If not you could piss off yourself and others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width