![]() |
|
#1
|
|||
|
|||
![]()
You have already been given the solution to this requirement practically on a silver platter. If you are then going to move the goal post after the start of the game at least take the time to read and try to apply it.
Basically you need to change your OnEntry procedure as such: Private Sub Document_ContentControlOnEnter(ByVal oCC As ContentControl) Dim lngIndex As Long Dim strSQL As String Select Case oCC.Title Case "Client" oCC.DropdownListEntries.Clear strSQL = "SELECT * FROM [Sheet1$];" xlFillList arrData, ThisDocument.Path & "\Providers.xlsx", "True", strSQL For lngIndex = 0 To UBound(arrData, 2) 'Since you have a gazillion empty records in your excel file: If Not IsNull(arrData(0, lngIndex) Then oCC.DropdownListEntries.Add arrData(0, lngIndex), arrData(0, lngIndex) End If Next lngIndex End Select End Sub The rest of the code would be edited accordingly (e.g., the OnExit) and all the rest of the CCs should be text CCs. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA coding for multiple drop-down lists to populate a text box for each list | yeatropulo | Word VBA | 14 | 11-11-2015 01:08 PM |
Error 5941 when running my macro to auto populate fields throughout the word doc | VBAnovice1 | Word VBA | 2 | 05-26-2015 01:35 AM |
Populate Word Drop-down list with Excel column then auto fill form fields with Excel data | Faldinio | Word VBA | 7 | 10-19-2014 06:03 AM |
![]() |
Greenhorn | Word | 4 | 09-05-2012 04:16 PM |
![]() |
2surgeons | Word | 4 | 03-05-2012 07:19 PM |