Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-10-2019, 09:37 PM
Abdelrahman Abdelrahman is offline Help with Cascading Dropdown List Windows 10 Help with Cascading Dropdown List Office 2019
Novice
Help with Cascading Dropdown List
 
Join Date: Jun 2019
Posts: 4
Abdelrahman is on a distinguished road
Default Help with Cascading Dropdown List

Hi


When I modified the defined list in "Master" and "Slave" list in https://www.msofficeforums.com/word-...down-list.html to include about 9 options and associated 1 to 9 different slave options, the drop down list is not working anymore. Can you please help?

I pasting what I did:
Code:
Option Explicit
Dim StrOption As String
Private Sub Document_ContentControlOnEnter(ByVal CCtrl As ContentControl)
If CCtrl.Title = "Master" Then StrOption = CCtrl.Range.Text
End Sub

Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
Application.ScreenUpdating = False
Dim i As Long, StrOut As String
With CCtrl
  If .Title = "Master" Then
    If StrOption = .Range.Text Then Exit Sub
    Select Case .Range.Text
      Case "Design"
        StrOut = "Inadequate Design,Incorrect design methodology"
      Case "Communication"
        StrOut = "No communication,Ineffective communication,Wrong message provided,Misunderstanding/misinterpreting message,Lack of/Awaiting on required information"
      Case "Plant and Equipment"
        StrOut = "Wrong plant/equipment used,Non compatible plant/equipment used"
      Case "Planning"
        StrOut = "Inadequate resource planning,Inadequate scope planning,Inadequate time planning"
      Case "Error/Violation"
        StrOut = "Poor workmanship,Non-compliance with plant/equipment's O&MM recommendations,Lack of supervision,Non-compliance with work methodology,Non-compliance with specification/acceptance criteria,Non-compliance with documented procedure/process,Unexpected Machine/Equipment Operational Failure,Operator Error,Operator lack of experience/competency/skill"
      Case "Materials Availability and Suitability or Quality of Material"
        StrOut = "Using non-approved material,Poor quality material,Defective material used"
      Case "Congestion/Restriction/Access"
        StrOut = "Inadequate space,Restrictions in place,Inadequate access"
      Case "ITP/Process Control"
        StrOut = "Lack of adoption of ITP control,Non-compliance with an ITP control"
      Case "Abnormal operational situation/condition"
        StrOut = "Inclement Weather Condition"
      Case "Document Control Management"
        StrOut = "Using superseded document,Non-availability of IFU document"
      Case "Subcontractor Management"
        StrOut = "Requirement not communicated to subcontractor,Lack of supervision on site"
      Case Else
        .Type = wdContentControlText
        .Range.Text = ""
        .Type = wdContentControlDropdownList
    End Select
    With ActiveDocument.SelectContentControlsByTitle("Slave")(1)
      .DropdownListEntries.Clear
      For i = 0 To UBound(Split(StrOut, ","))
        .DropdownListEntries.Add Split(StrOut, ",")(i)
      Next
      .Type = wdContentControlText
      .Range.Text = ""
      .Type = wdContentControlDropdownList
    End With
  End If
End With
Application.ScreenUpdating = True
End Sub

Last edited by macropod; 06-10-2019 at 09:48 PM. Reason: Added code tags
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Cascading Dropdown List Help with cascading dropdown list SaraO Word VBA 43 01-25-2023 04:05 PM
The same cascading dropdown lists several times in a document al9512 Word VBA 1 08-10-2018 04:42 AM
Help with Cascading Dropdown List Use the Same Cascading Dropdown Info Multiple Times Inger70 Word VBA 2 08-10-2018 04:41 AM
Help with Cascading Dropdown List A Userform and 4 Cascading List Boxes TheSwede Excel 3 04-02-2017 01:27 PM
Help with Cascading Dropdown List Linking WORD Cascading Dropdown Boxes to Excel music_al Word VBA 6 02-15-2016 03:56 PM

Other Forums: Access Forums

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