using vba to hide table rows...

J

Jan

Hi All,

I've got a question: How can I hide table rows using vba?

I've the following table:

--------------------------------------------------
| row1 | header |
--------------------------------------------------
| row2 | O hide_line_3 |
| | O hide_line_5 |
--------------------------------------------------
| row3 | O hide_line_4_and_5 |
--------------------------------------------------
| row4 | Text abcd |
--------------------------------------------------
| row5 | Text defg |
--------------------------------------------------

Where the O's are option buttons.

So in the on change event of hide_line_3 I want to show/hide line 3.
So in the on change event of hide_line_5 I want to show/hide line 5.
So in the on change event of hide_line_4_and_5 I want to show/hide line
4_and_5.

I tried already to make the heights 0, but it will mix up the format of the
other rows with the option buttons...

Any ideas? Every sugestion is welcome!!

Thanks!
jan
 
J

Jean-Guy Marcil

Jan was telling us:
Jan nous racontait que :
Hi All,

I've got a question: How can I hide table rows using vba?

I've the following table:

--------------------------------------------------
--------------------------------------------------

Where the O's are option buttons.

So in the on change event of hide_line_3 I want to show/hide line 3.
So in the on change event of hide_line_5 I want to show/hide line 5.
So in the on change event of hide_line_4_and_5 I want to show/hide
line 4_and_5.

I tried already to make the heights 0, but it will mix up the format
of the other rows with the option buttons...

Any ideas? Every sugestion is welcome!!

Have you tried:

Selection.Tables(1).Rows(3).Range.Font.Hidden = True?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top