Word 2003 : show/hide table

F

Fabien

Hello,

I try to build a vba macro where I have 10 checkbox and 10 table.
When a checkbox.value is true then the corresponding table is shown.
When a checkbox.value is false then the corresponding table is hide.
When a checkbox.value was false and bacome true, then the table is shown
again at it's old position.
To hide a table, that's easy (delete).
But to show it again, I can't find how to do !

Does someone can give to me a sample code ?

Thank you for your help.
 
C

Charles Kenyon

You can't show it again if you delete it unless you recreate it in some way.
The easiest way is to have your tables saved as AutoText entries and set
your code up to insert or delete the appropriate table. Have you considered
marking the text as hidden text and not/hidden text (and not using tables)?
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide


--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
F

Fabien

Charles said:
You can't show it again if you delete it unless you recreate it in some
way. The easiest way is to have your tables saved as AutoText entries and
set your code up to insert or delete the appropriate table. Have you
considered marking the text as hidden text and not/hidden text (and not
using tables)?

Thank you for you answer.

I have not try the AutoText command, but I will look in this direction,
thank you.
No, I can't replace the table by text, because I have many things on those
table cells like check boxes, entry... who need to be formated precisely
(hard to explain).

That's clear, deleting the table will cause it to be completely lost.

The current point where I am is to put the checkbox in the first cell of
each table and delete all the row, but not the first, when the checkbox
become false. This is to memorize the position of the table in the
document.
And when the checkbox become true again, I try to insert the old rows after
the remaining one. But an other problem appear, it is when I insert the new
rows, they are created every time BEFORE the single row (by copy/paste).
I don't want to delete the row with the checkbox because, of course, I will
loose the link with the code.

What does I have to do to be sure that the new rows will be inserted AFTER
the single table row ?
 
C

Charles Kenyon

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