L
Laurence Lombard
The statement
Userform1.ListBox1.RowSource = Sheets("Accs").Range("A2:B40")
results in an error "Type mismatch". I think the right hand side of the
equation must be a string, but I do not know how to construct the statement
so that it is of type string.
The rowsource is in a different sheet, so "A2:B40"" is not good enough.
I want to set different Rowsources for different columns, but this code does
not work.
If ActiveCell.Column = 9 Then
Set AccsList = Sheets("Accs").Range("A2:B110")
ElseIf ActiveCell.Column = 14 Then
Set AccsList = Sheets("Det").Range("A2:B50")
End IF
Userform1.ListBox1.RowSource = "AccsList"
Please help
Laurence
Userform1.ListBox1.RowSource = Sheets("Accs").Range("A2:B40")
results in an error "Type mismatch". I think the right hand side of the
equation must be a string, but I do not know how to construct the statement
so that it is of type string.
The rowsource is in a different sheet, so "A2:B40"" is not good enough.
I want to set different Rowsources for different columns, but this code does
not work.
If ActiveCell.Column = 9 Then
Set AccsList = Sheets("Accs").Range("A2:B110")
ElseIf ActiveCell.Column = 14 Then
Set AccsList = Sheets("Det").Range("A2:B50")
End IF
Userform1.ListBox1.RowSource = "AccsList"
Please help
Laurence