Abusalma02
New Member
- Joined
- Feb 29, 2020
- Messages
- 17
- Office Version
- 2019
- 2016
- Platform
- Windows
- Web
Please sir i wrote a code on my user form to populate a text box based on combo box selection but the text box isn't show anything. this is the code
on user form initialize:
this first code is working perfectly.
for combo box_Change ()
please help out if there is a way or anything else to do. Thank you sir.
on user form initialize:
VBA Code:
dim i as long, lastrow as long, ws as worksheet
set ws = Sheets ("Sheet1")
Lastrow = ws.Range("A" & Rows.count).End(xlup).Row
for i = 6 to Lastrow
me.combobox1.AddItem ws.cells(i, "C").value
for combo box_Change ()
VBA Code:
dim i as long, lastrow as long, ws as worksheet
set ws = Sheets ("Sheet1")
Lastrow = ws.Range("A" & Rows.count).End(xlup).Row
for i = 6 to Lastrow
if val(me.combobox1.value) = ws.cells(i, "A") then
me.textbox2 = ws.cells(i, "L").value
end if
next i