Jan 27th, 2000, 01:00 AM
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
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