I have resolved this issue now (by adding a new module, copying the below code for each field - just changing the Sub MustFillIn() to MustFillIn1, etc
How do i make drop down boxes mandatory? As i use the ActiveX combobox i do not have the ability to assign a macro
I have a large form on Word 2010 that use VBA for a variety of things like drop downs and text boxes.
A lot of these fields i would like to make mandatory. The code i found works for 1 field which is great, however i cannot add another mandatory field:
Sub MustFillIn()
If ActiveDocument.FormFields("ReferringSchool").Result = "" Then
Do
sInFld = InputBox("Please provide the name of the referring school")
Loop While sInFld = ""
ActiveDocument.FormFields("ReferringSchool").Result = sInFld
End If
End Sub
I managed to edit the code but then it decided to check all the mandatory fields everytime.
Any advice?