VB Assigning Values to a Series of Strings

C

cincode5

Hello,

In the VB Editor, I need to assign each letter of a 13 character string
(named JobScope) to individual Variables (K1 through K13). I'm using a
For/Next Loop to extract the indiv characters but cannot figure out how to
define the Variable K(x) where x = 1 to 13. Any suggestions?
 
H

Henry

cincode5,

Try making K an array with 14 elements (VBA numbers the first element as 0)
Then you can use the method you're trying at the moment.
For X = 1 To 13
K(X) = etc.
~
~
Next X

The only other change you'll have to make is how you address the variables
elsewhere. E.g, K5 will become K(5).

Henry
 
Top