Hoi allemaal,
Ik heb een x aantal tabellen in een worksheet die dezelfde structuur/format hebben. Hierbij vergelijk ik data van de huidige maand met de vorige maand. Hierdoor is het mogelijk dat de data - zoals weergeven in de tabel - veranderd. Iedere maand kan de positie van de modellen BINNEN de tabel veranderen, dus als bijv. rij 20 deze maand wordt gehided, dan hoeft dat niet zo te zijn in de volgende vergelijking.
Ik ga deze tabellen in PowerPoint plaatsen via "Paste Link" zodat de tabellen daarin automatisch geupdatet worden. Hierdoor is het plaatsen van een filter geen optie. Is het mogelijk om m.b.v. een VBA script de rijen te hiden/unhiden in de tabellen (niet de hele sheet)? Ik zat te denken aan 1 "CommandButton" met als tekst "Hide Rows" en "Unhide Rows".
Hello everyone,
I have got an x amount of tables in a worksheet that alle have the same structure/format. I make a comparison of the data of the current month with the last month. This makes the 'position' of the data within the table 'unstable'. E.g. a car is shown in row 22, but the next month this row can be empty, but row 21 can be filled in with data for example.
I am going to link these tables to PowerPoint via "Paste Link" so it gets automatically updatet with the desired format. This makes the 'autofilter' not an option. Is it possible to have a VBA script that hides/unhides rows WITHIN the tables (and not the rows inbetween the tables)? I was thinking on creating a "CommandButton" with the text "Hide rows" and "Unhide Rows" whenever someone clicks on it.
Down below you will see a picture with 2 tables. The upper one is the current situation, and the bottom table is how I want it to be after clicking/running the macro.
If there is a value within the tables in column F, then I want the row to be hidden. To give you exact information: the range of the table is from "F6" to "L17".
Yours sincerely,
Djani Sadloe
Ik heb een x aantal tabellen in een worksheet die dezelfde structuur/format hebben. Hierbij vergelijk ik data van de huidige maand met de vorige maand. Hierdoor is het mogelijk dat de data - zoals weergeven in de tabel - veranderd. Iedere maand kan de positie van de modellen BINNEN de tabel veranderen, dus als bijv. rij 20 deze maand wordt gehided, dan hoeft dat niet zo te zijn in de volgende vergelijking.
Ik ga deze tabellen in PowerPoint plaatsen via "Paste Link" zodat de tabellen daarin automatisch geupdatet worden. Hierdoor is het plaatsen van een filter geen optie. Is het mogelijk om m.b.v. een VBA script de rijen te hiden/unhiden in de tabellen (niet de hele sheet)? Ik zat te denken aan 1 "CommandButton" met als tekst "Hide Rows" en "Unhide Rows".
Hello everyone,
I have got an x amount of tables in a worksheet that alle have the same structure/format. I make a comparison of the data of the current month with the last month. This makes the 'position' of the data within the table 'unstable'. E.g. a car is shown in row 22, but the next month this row can be empty, but row 21 can be filled in with data for example.
I am going to link these tables to PowerPoint via "Paste Link" so it gets automatically updatet with the desired format. This makes the 'autofilter' not an option. Is it possible to have a VBA script that hides/unhides rows WITHIN the tables (and not the rows inbetween the tables)? I was thinking on creating a "CommandButton" with the text "Hide rows" and "Unhide Rows" whenever someone clicks on it.
Code:
Private Sub CommandButton4_Click()
If CommandButton4.Caption = "Hide Rows" Then
CommandButton4.Caption = "Show Rows"
Else
CommandButton4.Caption = "Hide Rows"
End If
End Sub
Down below you will see a picture with 2 tables. The upper one is the current situation, and the bottom table is how I want it to be after clicking/running the macro.
If there is a value within the tables in column F, then I want the row to be hidden. To give you exact information: the range of the table is from "F6" to "L17".
Yours sincerely,
Djani Sadloe