Hi,
I have be looking all over the internet trying to find out who on earth figured this out. I don't know what to call this process or what others are calling it to effectively find the answer. I thought using keywords like: looping, repeat, one row at a time, continuous, and continuously alongside the keywords like vba, excel, vba coding, excel vba, vba excel and so on, would pull up the solution to my situation, but have found no such situation nor solution. And, I know I can't possibly be the only wanting to achieve this; I am obviously using the wrong words, but I don't know what else to use to define it.
Anyway, I have stopped my long hours search to just stop by a forum I think would be full of VBA Excel experts and point me in the right direction or with a solution. I am using the 2007 version, if that matters.
And, I thought I was onto something with the code below, but I need the toggle button to be able to continuously unhide a single row one at a time--that I have hidden--every time it is clicked upon. I have 20 rows that I have hidden by default. Once the rows have been unhidden one at a time by clicking the toggle button, then it should not rehide the row.
Will some one please help me out?
This works for only unhiding a single row at a time for two hidden rows:
This does not work for only unhiding a single row at a time for more than two hidden rows:
Thank you in advance.
I have be looking all over the internet trying to find out who on earth figured this out. I don't know what to call this process or what others are calling it to effectively find the answer. I thought using keywords like: looping, repeat, one row at a time, continuous, and continuously alongside the keywords like vba, excel, vba coding, excel vba, vba excel and so on, would pull up the solution to my situation, but have found no such situation nor solution. And, I know I can't possibly be the only wanting to achieve this; I am obviously using the wrong words, but I don't know what else to use to define it.
Anyway, I have stopped my long hours search to just stop by a forum I think would be full of VBA Excel experts and point me in the right direction or with a solution. I am using the 2007 version, if that matters.
And, I thought I was onto something with the code below, but I need the toggle button to be able to continuously unhide a single row one at a time--that I have hidden--every time it is clicked upon. I have 20 rows that I have hidden by default. Once the rows have been unhidden one at a time by clicking the toggle button, then it should not rehide the row.
Will some one please help me out?
This works for only unhiding a single row at a time for two hidden rows:
Code:
Private Sub ToggleButton1_Click()
If ToggleButton1 Then
Rows(76).EntireRow.Hidden = False
Else
Rows(77).EntireRow.Hidden = False
End If
End Sub
This does not work for only unhiding a single row at a time for more than two hidden rows:
Code:
Private Sub ToggleButton1_Click()
If ToggleButton1 Then
Rows(76).EntireRow.Hidden = False
Else
Rows(77).EntireRow.Hidden = False
Else
Rows(78).EntireRow.Hidden = False
End If
End Sub
Thank you in advance.
Last edited: