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 / November 2005

Tip: Looking for answers? Try searching our database.

Word 2003 : show/hide table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fabien - 28 Nov 2005 15:52 GMT
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.
Charles Kenyon - 28 Nov 2005 15:55 GMT
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)?
Signature

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
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.

> Hello,
>
[quoted text clipped - 9 lines]
>
> Thank you for your help.
Fabien - 28 Nov 2005 16:24 GMT
> 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 ?
Charles Kenyon - 28 Nov 2005 19:50 GMT
http://word.mvps.org/faqs/customization/AutoText.htm
Signature

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
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.

>> 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
[quoted text clipped - 27 lines]
> What does I have to do to be sure that the new rows will be inserted AFTER
> the single table row ?
 
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.