Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

using vba to hide table rows...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jan - 03 Dec 2004 15:25 GMT
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
Jean-Guy Marcil - 03 Dec 2004 22:08 GMT
Jan was telling us:
Jan nous racontait que :

> Hi All,
>
[quoted text clipped - 26 lines]
>
> Any ideas? Every sugestion is welcome!!

Have you tried:

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

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Jan - 06 Dec 2004 08:09 GMT
Thanks JG!!!

I thought it would only hide mytext, not the entire row...

Jan

> Jan was telling us:
> Jan nous racontait que :
[quoted text clipped - 33 lines]
>
> Selection.Tables(1).Rows(3).Range.Font.Hidden = True?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.