Excel 迴圈的掛法
例如
var = 10
for x = 1 to 10
call function x1 (var)
next x
function x1 (var)
for y = 1 to var
debug.print 1
function
如果,變數是從外層代入
那麼,掛在外層,日後會比較好維護
如下
var = 10
for x =1 to 10
for y = 1 to var
call function x1 (var)
next y
next x
function x1 (var)
debug.print 1
function
var = 10
for x = 1 to 10
call function x1 (var)
next x
function x1 (var)
for y = 1 to var
debug.print 1
function
如果,變數是從外層代入
那麼,掛在外層,日後會比較好維護
如下
var = 10
for x =1 to 10
for y = 1 to var
call function x1 (var)
next y
next x
function x1 (var)
debug.print 1
function
留言
張貼留言