Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2014, 06:59 PM
gmaxey gmaxey is offline Populate Pulldown list with Macro Windows 7 32bit Populate Pulldown list with Macro Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,636
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Content controls and ActiveX controls lists can be populated using an array. The following code populates the a selected cc dropdown list:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim arrItems() As String
Dim lngIndex As Long
arrItems = Split("Item1|Item2|Item3", "|")
For lngIndex = 0 To UBound(arrItems)
  Selection.Range.ContentControls(1).DropdownListEntries.Add arrItems(lngIndex), arrItems(lngIndex)
Next lngIndex
End Sub

__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Pulldown list with Macro MSWord forms use list to populate successive text fields 2surgeons Word 4 03-05-2012 07:19 PM
Macro to List out all the Sub folders Ram1989 Excel Programming 0 02-27-2012 12:33 AM
Populate dropdown list with data from Access table spw4000 Office 0 02-24-2012 05:22 AM
Macro to populate a text form field based on dropdown selection koloa Word 0 10-20-2011 11:52 AM
Reset "Move to Folder" Pulldown RichieRich Outlook 0 10-09-2010 07:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:00 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