#1
|
|||
|
|||
How to create a ‘tickbox’ that hides text?
I’ve been experimenting for days trying to find a solution without avail.
I'm trying to find a way to create a ‘tickbox’ in front of a paragraph that hides/unhides said paragraph. Ideally, one can tick the answers they want hidden, and at the end of a document I can put a command button, that when pressed hides all the ‘ticked’ text, and tickboxes. I really appreciate any reply, I’ve really hit a brick wall on this one. Thank you in advance Example of how text is formatted, where *tickbox* represents where the tickbox should be: 1. *tickbox* Question is simply an information filler here? 2. *tickbox* Question is simply an information filler here, but this time there is 2 lines. 3. *tickbox* Question is simply an information filler here? |
#2
|
||||
|
||||
This topic has been discussed in numerous threads. See, for example:
https://www.msofficeforums.com/word-...rked-text.html https://www.msofficeforums.com/word-...displayed.html https://www.msofficeforums.com/word-...e-answers.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Quote:
|
#4
|
|||
|
|||
Quote:
I’ve been searching around for answer to a whole lot of questions on this, and other forums, and I keep seeing you help people and providing answers, I just want to thank you for what your contributing to this community (that coming from someone who’s very new). As far my question, I used the code you answered with in the first link you directed me too (works great!) Private Sub CheckBox1_Click() ActiveDocument.Bookmarks("Bookmark1").Range.Font.H idden = CheckBox1.Value End Sub This is great for the number of static questions I have, but do you know if this method can be adapted to ‘hide the answers entered to the questions in the document’? |
#5
|
||||
|
||||
The fundamental issue is knowing how many answers there are and where they are. That's what the bookmarks are used for in, for example, posts #2 & #4. Another way might be to put the questions and/or their answers in table cells so the code could loop though all tables/cells, hiding/unhiding as appropriate.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Quote:
I’m here posting the solution I found for anyone who might need this in the future. If one leaves a space and then a full stop at the end of the saved bookmark, information written within that space is automatically added to the bookmark, and therefore hidden later (my intention being to hide the bookmark with a tick box). This includes paragraphing also before the full stop. So, for example: Sample Question 1: . Sample Question 1: This text would also be added to the bookmark. Sample Question 1: This text would also be added to the bookmark. I just wanted to thank you ‘Macropod’ for helping me get there, you gave me the basis to figure out what ended up being a simpler answer than I would have expected, that I otherwise wouldn’t have reached |
Tags |
wordvba |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Soundplayer hides my powerpoint | Yellingjack | PowerPoint | 0 | 02-09-2017 06:58 AM |
Simple Hide columns macro, when I execute it hides everything left of selection, please help | mcronin | Excel Programming | 2 | 08-31-2016 05:15 PM |
how to create a special template to create a clear lay out for plain text | hex | Word | 1 | 04-01-2016 09:58 AM |
The powerpoint icon on the task bar hides pptx files in the recent files list | Innovationgame | PowerPoint | 0 | 11-13-2013 09:03 AM |
Pressing Ctrl Hides Pointer | daniil | PowerPoint | 1 | 11-28-2012 01:22 PM |