How to expand the hidden rows in excel using vba? -


i have spreadsheet, has 100 rows. among these 100 rows, 10 rows required displayed @ first, other 90 rows should collapsed(hidden) @ first. if user wants read whole 100 rows, he/she can click button expand spreadsheet of 10 rows 100 rows. how implement kind of function in vba?

you use command button:

private sub commandbutton1_click()      '// label button "show rows"     me.commandbutton1         if .caption = "show rows"             .caption = "hide rows"             rows("11:100").hidden = false         else             .caption = "show rows"             rows("11:100").hidden = true         end if     end  end sub 

or toggle button:

private sub togglebutton1_click()     '// label "show/hide rows"     rows("11:100").hidden = not togglebutton1.value end sub 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -