how to select the row of combobox value then copy and paste to another worksheet range using command button with VBA Excel -


my userform contains combobox , command button.

the combo box list populated range("clma") identifying range clma in row source field in combobox's properties. (no vba used populate list)

i want sub button_click() select row of data identified value in combobox , paste row worksheet.

the copy , pasting code should not problem hope can't seem reference or select value in combo box.

i learning vba, learning reading website , using macro recorder.

change columns whatever need,

private sub commandbutton1_click()     dim ws worksheet     dim drng range, c range     set ws = sheets("data")      set drng = ws.columns("a:a").specialcells(xlcelltypeconstants, 23)     each c in drng.cells         if c = listbox1             range(cells(c.row, "a"), cells(c.row, "d")).copy sheets("summary").cells(rows.count, "a").end(xlup).offset(1, 0)         end if     next c     unload me end sub 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -