Assign a range to where the User Form places data

G

GWYZOR

I have a user form with several text boxes and list boxes. I am having
difficulties getting the data to be put in the right range. It goes to the
next unused line and uses that line, however, there are couple lines at top
of spreadsheet, so it uses those, instead of starting on line 4 as I would
like. I have tried to select a range in which the lines are to be written,
but not getting good results. Undoubtedly there is an easy answer. Thanks
in advance for your attention.
 
P

Per Jessen

Hi

As always post your macro for comments.

Try and see if this can help you:

TargetRow=Range("A" & Rows.Count).end(xlup).Row
If TargetRow<4 then TargetRow=4
Range("A" & TargetRow)=TextBox1.Value
Range("B" & TargetRow)=TextBox2.Value

Hopes this helps.
....
Per
 

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