Private Sub B_AddEquiType_Click()
'Transfert the XmlFile
If Me.Cbx_EquiType = "" Then concat = concat & Me.Cbx_EquiType.ControlTipText & vbCrLf
' Message box
If concat <> "" Then
MsgBox "You must choose a type of equipment !", , "WARNING..."
Exit Sub
Else
'Select the good location
Range("B1").Select
'Copy the content in the list
ActiveCell.Value = Me.Cbx_EquiType
Application.Calculate
'Initialize
Cbx_EquiType.ListIndex = -1
End If
End Sub
Private Sub UserForm_Initialize()
Dim EquiType As String
Path = ActiveCell.Value
EquiType = Dir("D:\Data\")
Do While EquiType <> ""
If EquiType <> ThisWorkbook.Name Then Cbx_EquiType.AddItem EquiType
EquiType = Dir
Loop
End Sub