Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-21-2019, 06:51 AM
wolfgrrl wolfgrrl is offline MsgBox launch when a Check Box Content Control is clicked Windows 10 MsgBox launch when a Check Box Content Control is clicked Office 2010
Novice
MsgBox launch when a Check Box Content Control is clicked
 
Join Date: May 2019
Posts: 15
wolfgrrl is on a distinguished road
Question MsgBox launch when a Check Box Content Control is clicked

I'd like to program a message box to pop up when a checkbox content control box is checked.



I've worked with message boxes before, but not linked to a checkbox.

Is there a way to have this happen?

Thank you!
Reply With Quote
  #2  
Old 06-21-2019, 12:13 PM
gmaxey gmaxey is offline MsgBox launch when a Check Box Content Control is clicked Windows 10 MsgBox launch when a Check Box Content Control is clicked Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

wolfgrrl.


Yes. First you have to map the content control to a customXMLnode. You can easily do that using the Content Control Tools addin from my website: Content Control Tools


Assume you have mapped a checkbox titled "Check Test" then using this code in the ThisDocument module of the project, you can trigger a msgbox when the CC is checked.



Code:
Private Sub Document_ContentControlBeforeContentUpdate(ByVal ContentControl As ContentControl, Content As String)
  Select Case ContentControl.Title
    Case "Check Test"
      If ContentControl.Checked Then MsgBox "I'm checked"
  End Select
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
MsgBox launch when a Check Box Content Control is clicked Check box content control to show text when checked Strogg Word 3 02-10-2019 11:45 AM
MsgBox launch when a Check Box Content Control is clicked Check if named Content Control field exists and add missing sylvio Word VBA 2 08-29-2017 04:08 AM
Check Box Content Control when checked users are presented with an option cryder Word 0 01-07-2016 05:11 AM
MsgBox launch when a Check Box Content Control is clicked Replace checkbox symbol with check box content control canadansk Word VBA 5 04-01-2015 08:21 AM
Word2010 check boxes and plain text content control boxes in same table fcsungard Word 5 06-01-2012 01:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:09 AM.


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