Hello everyone,

I have a userform in which I have two comboboxes (one dependent from the other, depending from which i select first).

Now I which to add a label that changes according to one of the comboboxes selection. I do not want to have it as a combobox since it's just remark, so the user can only see that remark after the selection from the combobox.

I am able to make the label dependent from I what choose in the combobox, but I cannot put the right "values" in the label caption.

Also, the caption should be something like "13 / 14", with 13 being the column where the information to the left of the dash is stored, and 14 the column to the right of the dash.

Here's the whole userform code:

Private Sub UserForm_Activate()
    With UserForm1
        .Top = Application.Top + 15
        .Left = Application.Left + 600
    End With
End Sub
 Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
  If CloseMode = 0 Then
    Cancel = True
  End If
End Sub
Private Sub UserForm_Initialize()

Dim tempprice As Variant
Dim temsup As Variant
Dim temprmks As Variant

tempprice = 10
temsup = 12
temprmks = 13

'Load both combobox w/ cell values
Me.ComboBoxPrice.List = Worksheets("temp filter").Range(Cells(2, 10), Cells(2, 10).End(xlDown)).Value
 
Dim sAddress As String
 
With Sheets("temp filter")
   sAddress = Range(.Cells(2, tempprice), .Cells(2, tempprice).End(xlDown)).Address(0, 0, , 1)
   Me.ComboBoxPrice.List = .Evaluate("IF(LEN(" & sAddress & "),TEXT(" & sAddress & ",""#0.000""),"""")")
End With

'still need to correct
Me.ComboBoxSupplier.List = Worksheets("temp filter").Range(Cells(2, temsup), Cells(2, temsup).End(xlDown)).Value

'Me.Labelremarks.Caption = Worksheets("temp filter").Range(Cells(2, 13), Cells(2.3).End(xlDown)).Value
'Labelremarks.ControlSource = Worksheets("temp filter").Range(Cells(2, 13), Cells(2, 13).End(xlDown)).Value
'ListBoxremarks.ListIndex = Worksheets("temp filter").Range(Cells(2, temprmks), Cells(2, temprmks).End(xlDown)).Value
'MsgBox Left(Worksheets("temp filter").Cells(1, 14).Value, 10)
'still need to correct
If Left(Worksheets("temp filter").Cells(1, temprmks + 1).Value, 7) = "REMARKS" Then
Me.ComboBoxRemarks.List = Worksheets("temp filter").Range(Cells(2, temprmks), Cells(2, temprmks).End(xlDown)).Value '+ "/" + Worksheets("temp filter").Range(Cells(2, temprmks+1), Cells(2, temprmks+1).End(xlDown)).Value
Else
Me.ComboBoxRemarks.List = Worksheets("temp filter").Range(Cells(2, temprmks), Cells(2, temprmks).End(xlDown)).Value
End If

End Sub
Private Sub comboboxPrice_change()

'Select sheet
If ActiveSheet.Name = "temp filter" Then
ActiveSheet.Previous.Activate
End If

'Force CB2 value = CB1 list index #
ComboBoxSupplier.ListIndex = ComboBoxPrice.ListIndex

End Sub
Private Sub comboboxSupplier_change()

'Select sheet
If ActiveSheet.Name = "temp filter" Then
ActiveSheet.Previous.Activate
End If

'Force CB1 value = CB2 list index #
ComboBoxPrice.ListIndex = ComboBoxSupplier.ListIndex
ComboBoxRemarks.ListIndex = ComboBoxSupplier.ListIndex
Labelremarks.Caption = ComboBoxSupplier.ListIndex
ListBoxremarks.ListIndex = ComboBoxSupplier.ListIndex

End Sub

Private Sub commandbuttonOK_click()

ActiveCell.Value = ComboBoxPrice.Value
Cells(ActiveCell.Row, ActiveCell.Column + 1).Value = ComboBoxSupplier.Value

Unload Me

End Sub
Private Sub commandbuttonCancel_click()

Unload Me
If ActiveSheet.Name = "temp filter" Then
ActiveSheet.Previous.Activate
End If
End Sub
Thank you for your help