View Single Post
 
Old 11-22-2017, 12:08 AM
LaurenM LaurenM is offline Windows XP Office 2010 32bit
Novice
 
Join Date: Nov 2017
Posts: 14
LaurenM is on a distinguished road
Default

Thank you Macropod

At the moment I have this:

Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim i As Long, StrDetails As String
With ContentControl
  If .Title = "CHOOSE SECTOR" 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
    TextBoxLauren.Text = StrDetails
   ElseIf .Title = "CHOOSE SECTOR XHO" 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
    TextBoxLauren.Text = StrDetails
    Else
End If

End With

End Sub
I also need to lock the previous outputs so that if the sector changes mid report (in a new section) the previous outputs will remain unchanged. I hope this makes sense. Thank you in anticipation.
Attached Images
File Type: jpg Section Headers 1.jpg (80.1 KB, 27 views)
File Type: jpg Section Headers 2.jpg (20.6 KB, 27 views)

Last edited by macropod; 11-22-2017 at 01:05 AM. Reason: Added code tags
Reply With Quote