excel vba - Hide last column in range and clear cells -


i have checklist workbook allows check multiple items within work order. maximum amount of items 15. have piece of code allow me hide columns, starting farthest right, not needed cannot figure out how clear range within column hidden. need clear data row 7, 10, & 13:28 of column hidden.

here have:

sub removeitem() dim long = 20 7 step -1     if columns(i).hidden = false         bfirst = true         columns(i).hidden = true         exit     end if next end sub 

any appreciated, thanks!

this can done better, below code job done:

sub test()  dim long  = 20 7 step -1       if columns(i).hidden = false           bfirst = true           columns(i).hidden = true         rows(7).clearcontents           rows(10).clearcontents           range(cells(13, i), cells(28, i)).clearcontents       end if   next  end sub 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -