I am far more familiar with Excel than word, however, on this occasion I would like to hide specific rows in a table.
What syntax should I use to select a specific row and then hide it?
I am far more familiar with Excel than word, however, on this occasion I would like to hide specific rows in a table.
What syntax should I use to select a specific row and then hide it?
Word and Excel do not share equivalent functionality. There is no such thing in Word as hiding table rows and columns like Excel. However, you can format the text as Hidden and it will have the same effect. Highlight the rows you want to hide, then to go Home, the Font panel, click the arrow in the bottom right of the panel to bring up the Font menu, then click the Hidden checkbox.
Thanks for the prompt reply, however, I should have been a bit clearer with the question as I want to be able to do this using VBA code, hence the question about the syntax.
Sorry, I missed that the question was in a VBA forum.
How do you want to determine the row to hide? This will hide whatever text is selected:
Please Login or Register to view this content.
Last edited by 6StringJazzer; 12-12-2021 at 05:01 PM.
What I am trying to do is hide certain rows, depending on what a user selects from a list of buttons.
I kind of got it to work perfectly for only one combination of rows (lets say for example rows 2, 3 & 5), however, when I try to choose a different combination of rows (lets say for example (1, 4 & 7), the function does something odd from there on and makes all rows from 1 to 6 invisible and only shows 6 and 8.
When I delete the table and re-insert it, and try to make rows 1, 4 & 7 invisible, it works
I then make all rows visible and then try making rows 2, 3 & 5 invisible, the function does something odd from there on and makes all rows from 1 to 6 invisible and only shows 6 and 8.
Here is my Code for my declarations;
Here is my code for my buttonsPlease Login or Register to view this content.
Please Login or Register to view this content.
Here is my code to show all the rows;Please Login or Register to view this content.
and here is the main bit of code that does the hiding;Please Login or Register to view this content.
The table so far is a simple 1 column 8 row table.Please Login or Register to view this content.
My aim is to click a button, make all rows visible momentarily, then only make the selected rows invisible.
But it seems like the table get corrupted if I try one combination followed by another.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks