Heenan, Lambert
Lambert.Heenan at chartisinsurance.com
Thu Sep 2 14:26:43 CDT 2010
Fair enough, but is there anything wrong with... Sub StringItter(str As String) Dim n As Long For n = 1 To Len(str) 'dosomething Mid(str, n, 1) Debug.Print Mid(str, n, 1) Next n End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Saturday, March 22, 2008 8:11 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Treat string as array Hi John Have you forgotten how to read a file into a byte array? It is so easy as it hurts: Public Function aTest(strA As String) Dim abytTest() As Byte Dim intChar As Integer abytTest = strConv(strA, vbFromUnicode) For intChar = LBound(abytTest) To UBound(abytTest) Debug.Print abytTest(intChar); Next Debug.Print For intChar = LBound(abytTest) To UBound(abytTest) Debug.Print Chr(abytTest(intChar)); Next End Function /gustav >>> jwcolby at colbyconsulting.com 22-03-2008 22:14:56 >>> How can I turn a string into an array? I need to iterate through the characters of a string. For each char in str dosomething char Next char John W. Colby Colby Consulting www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com