Hello
Can anyone please provide a code snippet to populate visible cell in textbox1 ?
In detail: I have an userform by which I filter data using various criteria. As soon as user hits search, it looks for matching records and filters out. Now I need to Initialize userform with cell value against labels.
Below works for a combobox
But I need a code snippet for a textbox. Please help.
Thanks in advance.
Can anyone please provide a code snippet to populate visible cell in textbox1 ?
In detail: I have an userform by which I filter data using various criteria. As soon as user hits search, it looks for matching records and filters out. Now I need to Initialize userform with cell value against labels.
Below works for a combobox
Code:
Private Sub UserForm_Initialize()
'For i = 1 To Sheets("Sheet1").Cells(1, 1).SpecialCells(xlLastCell).Row
'If Sheets("Sheet1").Cells(i, 1) <> "" Then
TestForm.Combotest.AddItem (Cells(i, 1))
'End If
'Next
End Sub
But I need a code snippet for a textbox. Please help.
Thanks in advance.