Solved

Using VBA how can you hide a control checkbox in word?

Posted on 2009-04-01
3
561 Views
Last Modified: 2012-05-06
Using VBA how can you hide a control checkbox in word?  I cannot use the formfields checkbox as I need the on click event.
0
Comment
Question by:kriskyk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 24047675
If it is formatted as a Shape, i.e. not Inline, you can use this VBA code
Sub HideCheckBox1()
CheckBox1.Left = -100
End Sub

Open in new window

0
 
LVL 23

Accepted Solution

by:
irudyk earned 250 total points
ID: 24048906
Another option you could try and use, regardless of of how the checkbox is formatted, is to set the Height and Width property to the lowest accepted value of 0.75
So, try the following code:

Sub HideCheckBox()
     'Change CheckBox1 to the name of the checkbox object
     ThisDocument.CheckBox1.Height = 0.75
     ThisDocument.CheckBox1.Width = 0.75
End Sub

Open in new window

0
 

Author Closing Comment

by:kriskyk
ID: 31565647
Thanks!
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question