Hello ,
I try to populate data for all of sheets in listbox on userform , but shows mismatch error in this line
I hope some body fix this problem .
I try to populate data for all of sheets in listbox on userform , but shows mismatch error in this line
VBA Code:
r = Sheets(sh).Range("A1").CurrentRegion.Value
VBA Code:
Dim r As Variant
Sub LoadData()
Dim sh As Variant
For Each sh In Sheets(Array("Mussala", "mssau", "mjhgsg"))
r = Sheets(sh).Range("A1").CurrentRegion.Value
Next sh
With Me.ListBox1
.List = r
End With
End Sub
Private Sub UserForm_Initialize()
Call LoadData
End Sub