Hello Everyone,
Ive built a Spreadsheet which will reveal some rows (which contain notes) once a button is pressed.
It will then hide the rows once another row is pressed. Below is a simplified version of the sheet.
So once we press the 'Show Notes' button above it will run the simple macro 'Reveal_Item_1' below.
This will take the Rows 4, 5 & 6 and "unhide" them revealing the notes.
As you see on Row 4, it reveals a new button in Cell D4 which is linked to the Macro 'Hide_Item_1' which simply changes the 'Hidden = False' to a 'Hidden = True'
So heres the Question - Is there a way of linking them to the same button and including both commands under the same macro... a 'Show/Hide Notes' using an IF statement.
I was thinking something along the lines of -
Sub HideReveal_item_1
IF Row 4 = Hidden
Then Rows("4:6").EntireRow.Hidden = False
Else:
Rows("4:6").EntireRow.Hidden = True
This code will not work at all cause its missing some bits but does anyone know what you would add to make this code work.
Thanks in Advance
Ive built a Spreadsheet which will reveal some rows (which contain notes) once a button is pressed.
It will then hide the rows once another row is pressed. Below is a simplified version of the sheet.
So once we press the 'Show Notes' button above it will run the simple macro 'Reveal_Item_1' below.
This will take the Rows 4, 5 & 6 and "unhide" them revealing the notes.
As you see on Row 4, it reveals a new button in Cell D4 which is linked to the Macro 'Hide_Item_1' which simply changes the 'Hidden = False' to a 'Hidden = True'
So heres the Question - Is there a way of linking them to the same button and including both commands under the same macro... a 'Show/Hide Notes' using an IF statement.
I was thinking something along the lines of -
Sub HideReveal_item_1
IF Row 4 = Hidden
Then Rows("4:6").EntireRow.Hidden = False
Else:
Rows("4:6").EntireRow.Hidden = True
This code will not work at all cause its missing some bits but does anyone know what you would add to make this code work.
Thanks in Advance