You may get more help if you try to say in words what you want to accomplish without the C code (I can't read C).
HIi again for everybody. As you can know I'm a new user for VBA. I learn to program in C. Somethings for VBA are easy somethings no.
But there is my question:
Can I use a string in VBA just like C.
I'm trying to get character one by one for a string.
Can I do somehting like that here?
In C I use:
For ( int i = 0; string[i] != '\0"; i++)
cout << string[i];
Last edited by Jack in the UK; October 28th, 2006 at 18:34.
Ed, as you problem is getting each letter from a String, why not use something like that for your Thread Title?
POOR THREAD TITLE Please read THIS PAGE IN FULL
VB:Sub GetLetters() Dim strArray() As String Dim strText As String Dim lLoop As Long, lCount As Long strText = "Hello" lCount = Len(strText) Redim strArray(lCount - 1) For lLoop = 0 To lCount - 1 strArray(lLoop) = Mid(strText, lLoop + 1, 1) Next lLoop Range("A1:A" & lCount) = WorksheetFunction.Transpose(strArray) End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)