![]() |
|
#2
|
|||
|
|||
|
By fields, I will assume you mean formfields. Formfield dropdowns by design can't be empty. They have to contain one of the list items that you define.
E.g., you might define "Choose Letter" as the first entry then A, B, C, D etc. Sub ValidateFFs() Dim oFF As FormField For Each oFF In ActiveDocument.FormFields Select Case oFF.Name Case "Dropdown1" If oFF.Result = "Choose Letter" Then oFF.Range.Select MsgBox "This field must have a valid selection" Exit For End If Case "Text1" 'Your code for validating the Text1 field. End Select Next oFF End Sub |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Code line for adding Building Blocks to a macro in Visual Basic
|
proking | Word VBA | 9 | 01-07-2020 10:05 AM |
| Activate (show) a Drop-down form field when another drop-down form field is selected from | Jentis | Word VBA | 1 | 04-19-2018 09:42 PM |
| Word Form/ActiveX drop down menu/value in a different field | AMackenzieFFCU | Word VBA | 1 | 01-14-2013 07:48 AM |
Visual basic code for Word 2003 template
|
KateAus | Word VBA | 4 | 09-09-2012 08:40 PM |
How to I make text Bold in a User Form -Visual Basic
|
gurp99 | Word VBA | 11 | 03-12-2012 04:05 PM |