excel - I'm trying to add values into an array through a for each loop -


i'm new vba , i'm trying add values array going through loop, can't seem add values. doesn't throw errors, comes nothing. here's have:

dim long dim results() long  redim results(1 6)  = 1 = 6     results(i) = 1 next  msgbox results(1) 

no matter what, message box comes zero. offer appreciated.

your loop written wrong. wrote following

for = 1 = 6 

vba interpreting = 6 expression (is equal 6?) expression evaluates false, gets converted integer (zero), attempts execute for = 1 0, null loop entire loop gets skipped.

it should be

for = 1 6 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -