PC Review


Reply
Thread Tools Rate Thread

Assign a range to where the User Form places data

 
 
GWYZOR
Guest
Posts: n/a
 
      22nd Dec 2009
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.
 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      22nd Dec 2009
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


On 22 Dec., 23:14, GWYZOR <GWY...@discussions.microsoft.com> wrote:
> 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 tothe
> 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.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign a range-name from B2 to {end of data} Jimbo213 Microsoft Excel Programming 8 29th Jul 2009 06:03 AM
How do I assign a letter value to a range of data? =?Utf-8?B?Y2xhdHRlcnM2OQ==?= Microsoft Excel Misc 1 16th Sep 2006 05:55 PM
Assign number to every value in a data range??? the dude Microsoft Excel Worksheet Functions 1 16th May 2006 08:41 PM
user form - data range sam1 Microsoft Excel Programming 4 28th Mar 2006 01:27 AM
How to: User Form to assign a user defined range to a macro variab =?Utf-8?B?VHJldlRyYXY=?= Microsoft Excel Programming 1 22nd Mar 2005 07:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:52 PM.