For loop Vba with 2 variable -


arrayone(1) = arraytwo(1) = b
arrayone(2) = c arraytwo(2) = d
arrayone(3) = e arraytwo(3) = f

i need loop through 2 arrays call sub. note sub called in pair, e.g.:

sub(arrayone(1), arraytwo(1))
sub(arrayone(2), arraytwo(2))

is possible initialize 2 variables? that:

for x = lbound(arrayone) ubound(arrayone) , y = lbound(arraytwo) ubound(arraytwo)     call sub(x, y)   next x 

thanks

one for next loop cannot use 2 indexers
if sure arrays same size, can use same indexer both arrays

dim integer = lbound(arrayone) ubound(arrayone)     call sub(arrayone(i), arraytwo(i))  next 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -