vba - I modified the code, I have suppliers as sheet names, but it seems to not run my code through all the sheets -
original code:
sub loopthroughsheets() dim months variant dim month variant months = array("jan", "feb", "mar", "apr", "may", "jun", "jul", _ "aug", "sep", "oct", "nov", "dec") each month in months 'code goes here. next month end sub modified code:
sub loopthroughsheets() dim suppliers variant dim supplier variant suppliers = array("a", "b", "c", "d", "e", "f", "g", "h", "i", _ "j", "k", "l", "m", "n", "o", "p", "q") each supplier in suppliers 'code goes here. next supplier end sub
here template use if tabs "lettered"
sub loopthroughsheets() dim suppliers variant, supplier variant suppliers = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q") each supplier in suppliers sheets(supplier) .range("a1").value = "qwerty" end next supplier end sub
Comments
Post a Comment