Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
Code:
Private Sub cmbSDPFLine_Enter() Dim i As Long
cmbSDPFLine.Clear
cmbPrdCde.Enabled = False
cmbPrdCde.Clear
txtbxPrdctNm.Text = ""
WS_Count = ActiveWorkbook.Worksheets.Count
For i = 4 To WS_Count
cmbSDPFLine.AddItem Sheets(i).Name
Next
End Sub
On my userform I have two combo boxes. The first one is the one above mentioned. The other combo box is called cmbPrdCode which the Enabled is set to False until cmbSDPFLine contains a value. This part of the code is located in cmbSDPFLine Change.
Code:
if cmbsdpfline.Value=cmbSDPFLine.AddItem Sheets(i).Name then
Code:
if cmbsdpfline.Value=cmbSDPFLine.AddItem Sheets(i).Name then
cmbPrdCde.Enabled = True
End If
What I want to achieve is if the cmbsdpfline value is equal to any of the machine sheet names that starts on sheet four, then enable cmbPrdCde combo box. Thank You for any help offered.
Last edited: