Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-13-2015, 02:22 PM
ptmuldoon ptmuldoon is offline Create UserForm ComboBox or ContentControl Windows 7 64bit Create UserForm ComboBox or ContentControl Office 2013
Advanced Beginner
Create UserForm ComboBox or ContentControl
 
Join Date: Sep 2014
Posts: 93
ptmuldoon is on a distinguished road
Default Create UserForm ComboBox or ContentControl

I've been struggling with the best way for a user to be able to press a button/macro, etc then choose from a selection of charts to add to their document. I think I moved away from using building blocks to either a UserForm or Content Control.



In my Excel file, I have created a worksheet that has 2 columns. A Chart Name and the LINK code of the chart.

From Macropod, I found this post on creating a Content Control how-import-list-excel-into-drop-down But for some reason, when I when chose an Item, I am not getting the Value to show in the word document although I see a different value (ie, column B) when viewing the properties.

and then I also found this post by MVP Greg Maxey on setting up a Userform list from the excel data populate_userform_listbox_or_combobox. But again, I'm still struggling on getting the dropdown list to show a Chart Name/Description, and then input the link code.

I can post more sample code. But before doing so. Which would be the better approach to work with.

And to help, In word, I can currently open the excel file, get the link and add it with the below. Now I'm trying to create a listing of all of the charts/links

Code:
'    Code above to get Excel File and Chart.  Using late Binding so user
'    does not need to set reference in Word.
'
'    With objSht
'        ChartLink = .Range("C2")
'        MsgBox ChartLink
'    End With
'
'    C2 Cell Value is = LINK  Excel.SheetMacroEnabled.12 "C:\\Data\\SampleWPs.xlsm" "Cover Charts!Charts_Cover_Main" \p
'    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:=ChartLink, PreserveFormatting:=False
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Code in a UserForm module to delete a Command Button which opens the userform Simoninparis Word VBA 2 09-21-2014 03:50 AM
Create UserForm ComboBox or ContentControl Is it possible to take an input from a UserForm in one document to a UserForm in a do BoringDavid Word VBA 5 05-09-2014 09:08 AM
Create UserForm ComboBox or ContentControl Trying to Reference a ContentControl Using DocProperty SuzeG Word VBA 4 12-17-2013 03:40 PM
Create UserForm ComboBox or ContentControl Activate/ select ContentControl czsti Word VBA 1 08-14-2013 08:32 AM
ComboBox ListIndex = -1 even though it does NOT = -1 Joe Patrick Word VBA 0 08-03-2011 08:34 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:16 AM.


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