A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

using vba to hide rows in a table



 
 
Thread Tools Display Modes
  #1  
Old December 3rd, 2004, 03:25 PM
Jan
external usenet poster
 
Posts: n/a
Default using vba to hide rows in a table

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
  #2  
Old December 4th, 2004, 10:46 PM
macropod
external usenet poster
 
Posts: n/a
Default

Hi Jan,

Word has no 'hide' row function and you can't actually make the row heights
= 0 either, though you can come close to it. Depending on what you're trying
to achieve, you might need to delete the offending row(s).

Cheers


"Jan" wrote in message
...
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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 19/11/2004


  #3  
Old December 6th, 2004, 12:40 PM
Cindy M -WordMVP-
external usenet poster
 
Posts: n/a
Default

Hi =?Utf-8?B?SmFu?=,

: How can I hide table rows using vba?

If you format the entire row as "hidden" (Format/Font) the
row will disappear (assuming you disallow display of things
formatted hidden in Tools/Options/View (or VBA equivalent))

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table Wizard Does Not Set Relationship if Foreign Key and Primary Key Name Do Not Match Exactly in Case. HDW Database Design 3 October 16th, 2004 03:42 AM
Automatic filling of fields in table two from table one Jim Kelly Database Design 1 September 27th, 2004 10:16 PM
Semicolon delimited text query help Al Guerra Running & Setting Up Queries 3 August 12th, 2004 11:50 AM
change a table to 3 columns only (Rows instead of Table) Mo General Discussion 2 August 7th, 2004 10:16 PM
change a table to 3 columns only (Rows instead of Table) Mo Worksheet Functions 1 August 7th, 2004 09:23 PM


All times are GMT +1. The time now is 04:51 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.