![]() |
|
|
|
#1
|
||||
|
||||
|
Quote:
StrWkBkNm = "C:\Users\" & Environ("Username") & "\Documents\Workbook Name.xls" StrWkShtNm = "Sheet1" As coded, the macro expects the dropdown to be populated to be the first one in the document, but I'm sure you can see where you can change that in the code.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Quote:
OK, I think I figured it out. I got the code to work but I have one final question... Code:
With xlWkBk.Worksheets(StrWkSht)
' Find the last-used row in column A.
LRow = .Cells(.Rows.Count, 1).End(xlUp).Row
' Populate the content control,
ActiveDocument.ContentControls(4).DropdownListEntries.Clear
For i = 1 To LRow
ActiveDocument.ContentControls(4).DropdownListEntries.Add Text:=Trim(.Range("A" & i)), Value:=Trim(.Range("B" & i))
Next
End With
Your input (and patience) is very much appreciated.
|
|
#3
|
||||
|
||||
|
Quote:
For i = 2 To LRow
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|