Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-13-2018, 09:28 AM
PointCheck PointCheck is offline Error Message Windows 10 Error Message Office 2016
Novice
Error Message
 
Join Date: Aug 2018
Posts: 3
PointCheck is on a distinguished road
Default Error Message

I have a question:

Based on a selection in a Combo Box of either Akron, Cincinnati, Columbus, Dayton, Youngstown. Populate five different Text Box?

For example, If I select "Akron" in the Combo Box? The following Text Boxes 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



It was suggested to use the following code:
I put the example in my letter. In the letter, I also have other Combo boxes. When I add the code below I get an 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
___________________________________________
Any assistance would be great.
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
No known fix for this error message... Aymincendiary PowerPoint 1 09-03-2017 05:38 PM
Error Message Reserved error(-1517); there is no message for this error ktest Office 1 02-12-2016 08:08 PM
Error Message Automation error Unknown error" message once they open the Excel file hlina Excel 1 10-08-2013 09:14 PM
Error message White House Outlook 1 12-07-2010 04:52 AM
sent mail error message Carolemc Outlook 0 09-26-2006 03:21 AM

Other Forums: Access Forums

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