Hi
I have a sheet which is filtered and I want to populate textboxes on a userform with data from a selected row of the filtered sheet.
I have identified the RowNo of visible cells I want populating, but the code I have below gives me a 'Could not set the Value property. Type mismatch.' error.
Can someone help me understand what I am doing wrong?
Thanks 
Sub PrintData()
Dim RowNo As Long
RowNo = Sheets("Module Data 2").Range("L2").Value
With Sheets("Inventory")
txt1.Value = Sheets("Inventory").Cells(1, RowNo).SpecialCells(xlCellTypeVisible).Value
'TextBox6.Value = .Range("B" & RowNo).SpecialCells(xlCellTypeVisible)
'TextBox11.Value = .Range("C" & RowNo).SpecialCells(xlCellTypeVisible)
End With
End Sub
Bookmarks