469,900 Members | 1,698 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,900 developers. It's quick & easy.

create a button in excel to hide/unhide rows when clicked.

nev
251 100+
first of all, i'm not sure if this is the correct forum to post this question. please move if ever. the reason i placed it here is because you can create visual basic code in excel.

i don't know how to do this but i think it is possible. i can place a button on my excel sheet but i don't know how to code it so that when clicked, it can toggle hide/unhide of rows 3 to 5.

does anyone know how to do this? can you supply me the simple code? thank you.
Feb 5 '08 #1
2 9236
Keep the button away from rows 3 to rows 5.
Assign the the following macro to the button...
'--
Sub TakingTurns()
Rows("3:5").Hidden = Not Rows("3:5").Hidden
End Sub
'--

first of all, i'm not sure if this is the correct forum to post this question. please move if ever. the reason i placed it here is because you can create visual basic code in excel.

i don't know how to do this but i think it is possible. i can place a button on my excel sheet but i don't know how to code it so that when clicked, it can toggle hide/unhide of rows 3 to 5.

does anyone know how to do this? can you supply me the simple code? thank you.
Feb 5 '08 #2
nev
251 100+
Keep the button away from rows 3 to rows 5.
Assign the the following macro to the button...
'--
Sub TakingTurns()
Rows("3:5").Hidden = Not Rows("3:5").Hidden
End Sub
'--
i'll try it. thank you :-)
Feb 5 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Dautkhanov | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.