accessuser1023
Registered User.
- Local time
- Today, 10:58
- Joined
- Nov 12, 2012
- Messages
- 71
all,
I have this block of code:
what I'd like to do is streamline it. There are 3 lines of text being captured here. What is (supposed to be) happening is that each block of characters (3 characters per line positions, starting at position 1 or positions every 3 char increments after that) is being captured until all 9 chars are stored in strOut.
9 chars = 3 chars on each line * 3 lines.
is there any better way to do this mathematically? I realize that we can manipulate the variables and coding many different ways, but I'm not interested in that. I'm only interested in using math or leveraging techniques to speed up the process here. I'm trying to focus on the massive iteration and turning it into something more useful and less convoluted.
comments welcome. thanks!
I have this block of code:
Code:
If ctr = 4 Then
For block = 1 To 9
For ctr2 = 1 To 3 'each line.
For ctr3 = 1 To 3 'char 1 - 3 in each line.
Select Case ctr2 'which line?
Case 1
strOut = strOut & Mid(Line1, ctr3, 1)
Case 2
strOut = strOut & Mid(Line2, ctr3, 1)
Case 3
strOut = strOut & Mid(Line3, ctr3, 1)
End Select
Next ctr3
Next ctr2
Next block
End If
what I'd like to do is streamline it. There are 3 lines of text being captured here. What is (supposed to be) happening is that each block of characters (3 characters per line positions, starting at position 1 or positions every 3 char increments after that) is being captured until all 9 chars are stored in strOut.
9 chars = 3 chars on each line * 3 lines.
is there any better way to do this mathematically? I realize that we can manipulate the variables and coding many different ways, but I'm not interested in that. I'm only interested in using math or leveraging techniques to speed up the process here. I'm trying to focus on the massive iteration and turning it into something more useful and less convoluted.
comments welcome. thanks!