SOLVED

Can't figure out a subscript error (simple arry)

%3CLINGO-SUB%20id%3D%22lingo-sub-1262724%22%20slang%3D%22en-US%22%3ECan't%20figure%20out%20a%20subscript%20error%20(simple%20arry)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1262724%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20going%20crazy.%20I'm%20getting%20a%20subscript%20out%20of%20range%20error%20and%20can't%20figure%20out%20why.%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20coding%20example%20below%20are%20two%20example%20of%20creating%2C%20filling%20and%20referencing%20an%20array.%20They%20look%20the%20same%20to%20me%20...%20but%20the%202nd%20one%20blows%20up.%20What%20am%20I%20not%20seeing%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JBF_54_0-1585504268676.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F180349i35DFD4424DBB6CD6%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22JBF_54_0-1585504268676.png%22%20alt%3D%22JBF_54_0-1585504268676.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1262724%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1263048%22%20slang%3D%22en-US%22%3ERe%3A%20Can't%20figure%20out%20a%20subscript%20error%20(simple%20arry)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1263048%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F535078%22%20target%3D%22_blank%22%3E%40JBF_54%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFound%20the%20problem%20...%20variant%20arrays%20are%20always%202%20dimensional%2C%20I%20was%20missing%20one%20of%20the%20subscripts.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

I'm going crazy. I'm getting a subscript out of range error and can't figure out why. 

In the coding example below are two example of creating, filling and referencing an array. They look the same to me ... but the 2nd one blows up. What am I not seeing?

JBF_54_0-1585504268676.png

 

1 Reply
Highlighted
Best Response confirmed by JBF_54 (Contributor)
Solution

@JBF_54 

 

Found the problem ... variant arrays are always 2 dimensional, I was missing one of the subscripts.