Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-07-2018, 10:21 AM
PointCheck PointCheck is offline Inser text automaticly based on a selection is a Drop Down Active X Control Windows 10 Inser text automaticly based on a selection is a Drop Down Active X Control Office 2016
Novice
Inser text automaticly based on a selection is a Drop Down Active X Control
 
Join Date: Aug 2018
Posts: 3
PointCheck is on a distinguished road
Default Inser text automaticly based on a selection is a Drop Down Active X Control

I have a 2 questions:

1. How do I add the following selections (Akron Cincinnati, Columbus, Dayton , Youngstown) to a Combo Box(ActiveX Control)?


2. Based on a selection in the above Combo Box(ActiveX Control of either Akron, Cincinnati, Columbus, Dayton, Youngstown. Populate five different Text Box(ActiveX control)?

For example, If I select "Akron" in the Combo Box(ActiveX Control)? The following Text Boxes(ActiveX controls) would populate. see below

Combo Box 1 = Akron
Text Box 1 = Kim Lee
Text Box 1 = 123 No Name Street
Text Box 1 = Cols, Oh 45623
Text Box 1 = 214-567-8954
Text Box 1 = klee@msn.com

Any assistance would be great.

Last edited by PointCheck; 08-08-2018 at 08:14 AM. Reason: New Question
Reply With Quote
  #2  
Old 08-07-2018, 10:00 PM
macropod's Avatar
macropod macropod is offline Inser text automaticly based on a selection is a Drop Down Active X Control Windows 7 64bit Inser text automaticly based on a selection is a Drop Down Active X Control Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

One would have to ask why you're using an ActiveX Control for this. Unlike content controls and formfields, ActiveX Controls require a macro to populate them every time the document is opened. For a content control solution, see:
https://www.msofficeforums.com/word-...html#post46903
and, for different elements from a selected item to be output to different content controls, see:
https://www.msofficeforums.com/word-...tml#post120392
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-08-2018, 08:13 AM
PointCheck PointCheck is offline Inser text automaticly based on a selection is a Drop Down Active X Control Windows 10 Inser text automaticly based on a selection is a Drop Down Active X Control Office 2016
Novice
Inser text automaticly based on a selection is a Drop Down Active X Control
 
Join Date: Aug 2018
Posts: 3
PointCheck is on a distinguished road
Default Reply

I put the example in my form. When I add new dropdown boxes and select the example I get am error in the code (Orange section). Can you assist?

Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim i As Long, StrDetails As String
With ContentControl
If .Title = "MBACRegion" Then
For i = 1 To .DropdownListEntries.Count
If .DropdownListEntries(i).Text = .Range.Text Then
StrDetails = Replace(.DropdownListEntries(i).Value, "|", Chr(11))
Exit For
End If
Next
ActiveDocument.ContentControls(2).Range.Text = StrDetails
End If
End With
End Sub
Reply With Quote
  #4  
Old 08-08-2018, 02:51 PM
macropod's Avatar
macropod macropod is offline Inser text automaticly based on a selection is a Drop Down Active X Control Windows 7 64bit Inser text automaticly based on a selection is a Drop Down Active X Control Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Do you have a second (text) content control in the document for the output to go to?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to provide text string with specific formating based on Drop down list (content control) MP1989 Word VBA 4 07-30-2018 02:40 AM
Inser text automaticly based on a selection is a Drop Down Active X Control Creating text based on drop-down menu selection emckillen Word 9 09-27-2017 04:52 PM
Inser text automaticly based on a selection is a Drop Down Active X Control Drop down lists and pulling data from worksheet based on drop down selection cjoyce73 Excel 5 07-17-2017 07:40 AM
Inser text automaticly based on a selection is a Drop Down Active X Control Edit table cells based on content control selection gennatr12 Word VBA 7 03-26-2017 08:51 PM
Hide/Unhide Text Based on Drop Down Selection gw1500se Word 3 02-19-2015 12:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft