Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-19-2019, 11:24 AM
MathiasFC MathiasFC is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2019
Posts: 12
MathiasFC is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 01-19-2019, 01:16 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 01-19-2019, 05:35 PM
MathiasFC MathiasFC is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2019
Posts: 12
MathiasFC is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Thank you so much for pointing me in the right direction here, and for the swift reply
Reply With Quote
  #4  
Old 01-22-2019, 12:44 PM
MathiasFC MathiasFC is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2019
Posts: 12
MathiasFC is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post

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’?
Reply With Quote
  #5  
Old 01-22-2019, 01:40 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #6  
Old 02-10-2019, 02:39 PM
MathiasFC MathiasFC is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2019
Posts: 12
MathiasFC is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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.

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
Reply With Quote
Reply

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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft