Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
AmandaH AmandaH is offline
external usenet poster
 
Posts: 54
Default Hiding/showing a table with VBA

Hello all,

I am trying to find out for I can trun a table on or off depending on a
yes/no answer from a form field. I am using Word 2003 and the VBA that
comes with it. Any ideas/links would be of great help.

~Amanda~

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default Hiding/showing a table with VBA

Hi Amanda,

You don't need vba for this.

The solution is to:
.. select the table
.. press Ctrl-F9 to enclose it in a field
.. just before the table, press Ctrl-F9 again, to insert another field
.. fill in the field so that they look like type {IF{BkMrk \* Caps}= "Y*"
Table}
where 'BkMrk' is the bookmark name assigned to your formfield and 'Table'
is your table
.. use 'N' instead of 'Y' above if the table is meant to appear in response
to a 'no' answer
.. set the formfield's properties to 'calculate on exit'

Cheers

--
macropod
[MVP - Microsoft Word]


"AmandaH" wrote in message
oups.com...
Hello all,

I am trying to find out for I can trun a table on or off depending on a
yes/no answer from a form field. I am using Word 2003 and the VBA that
comes with it. Any ideas/links would be of great help.

~Amanda~



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP- Cindy M  -WordMVP- is offline
external usenet poster
 
Posts: 370
Default Hiding/showing a table with VBA

Hi AmandaH,

I am trying to find out for I can trun a table on or off depending on a
yes/no answer from a form field. I am using Word 2003 and the VBA that
comes with it.

You can format the table with a specific style. The code for the On Exit
property of the checkbox change the styles' FONT.Hidden property to true
(or false). this works without turning off document protection.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
20x20 multiplication table Bob S Tables 2 December 24th 05 02:27 PM
Table headers/footers and layout Keith Page Layout 1 April 8th 05 07:37 PM
How to Avoid Word 2003 Table Style Problems Judy Haynes Tables 0 March 23rd 05 06:41 PM
Table AutoFormats vs. Table Styles confusion Tony Jollans Tables 5 March 6th 05 07:18 PM
table caption numbering scottkinsey Tables 1 November 11th 04 11:47 AM


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

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"