Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 02-13-2015, 01:44 PM
EricMannzi EricMannzi is offline Properties for data entry control on Form help Windows 7 64bit Properties for data entry control on Form help Office 2010 64bit
Novice
Properties for data entry control on Form help
 
Join Date: Feb 2015
Posts: 7
EricMannzi is on a distinguished road
Default

hmmm....this may be a bit over my head I think. The one content control I need to have validated is a simple yes/no selection control that I need the user to answer, otherwise they will not be able to continue to tab to the next entry. So to validate the content control, which I named "ok to call Y-N" control should be the named control in the script, just not sure how to set it in the vb editor for the document. Any examples?? or can I get some help with a snipet? maybe email the document? Sorry to be a pain.

Option Explicit
Private Sub Document_ContentControlOnExit(ByVal CC As ContentControl, _
Cancel As Boolean)
Dim strTemp As String
Dim bGate1 As Boolean, bGate2 As Boolean, bGate3 As Boolean
Dim bGate4 As Boolean, bGate5 As Boolean, bValid As Boolean
Dim i As Long
Dim oRng As Word.Range
strTemp = CC.Range.Text
bValid = False
'If Application.Version < "14.0" Then Main.SetDeveloperTabActive
Select Case CC.Title
Case "ok to call Y-N"
If CC.ShowingPlaceholderText = True Or strTemp = "" Then
MsgBox "This field cannot be left blank."
'Makes CC mandatory. User can' exit until data is entered.
Cancel = True
End If
End Select
lbl_Exit:
Exit Sub
End Sub


still was able to tab through CC
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add custom doc properties in "Doc properties control" eazysnatch Word 2 09-13-2017 08:08 PM
Properties for data entry control on Form help Form field selection allows entry into form text box David C Word 1 10-24-2012 04:53 AM
Properties for data entry control on Form help User Form to Automate Entry in report Panzer Word VBA 2 08-22-2012 04:17 AM
Excel VBA: Control Word Table and Set its properties tinfanide Excel Programming 0 12-10-2011 09:06 AM
Printable Entry Form eJames Excel 1 01-07-2010 09:50 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:19 PM.


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