copy data to combobox value sheet

T

TUNGANA KURMA RAJU

I have a userform, with a combobox ,its list values are sheets names of
activeworkbook.it has 4 textboxes(input) ,after inputting data in these
boxes,the values be copied to (combobox1.vaue)w/sheet last row.I am using
line code
worksheets(.combobox1.value).activate
Range("A1").select
Do
then the code follows to find last empty cell.
When I run this sub I am getting error 'object required'.
How to select Combobox1.value sheet?what is line of code?
 
S

Shasur

Hi

Cany you try like this below:

lLastRow =
Worksheets(.combobox1.Value).Cells.SpecialCells(xlCellTypeLastCell).Row
Worksheets(.combobox1.Value).Cells(1, lLastRow).Value = TextBox1.Text


Cheers
Shasur
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top