Text Boxes and Last Empty Row :: MrExcel Message Board


 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

Text Boxes and Last Empty Row
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

cfer
Board Regular


Joined: 30 Jul 2002
Posts: 34


Status: Offline

 Reply with quote  

Text Boxes and Last Empty Row

I have searched and found how to go to the last empty row, but cannot work out how to have the data from say 5 text boxes (user input form) put all in the same last row in different columns, one for each text box.

Thanks again

Post Sat Sep 20, 2003 7:27 am 
 View user's profile Send private message

Ivan F Moala
MrExcel MVP


Joined: 11 Feb 2002
Posts: 3211
Location: Auckland, New Zealand
Flag: Newzealand

Status: Offline

 Reply with quote  

cells(row,column)=Textbox1.Value
cells(row,column+1)=Textbox2.Value
cells(row,column+2)=Textbox3.Value etc
_________________
Kind Regards,
Ivan F Moala From the City of Sails

Post Sat Sep 20, 2003 7:40 am 
 View user's profile Send private message Send e-mail Visit poster's website

cfer
Board Regular


Joined: 30 Jul 2002
Posts: 34


Status: Offline

 Reply with quote  

Re: Text Boxes and Last Empty Row

Thanks Ivan, but I tried to incorporate it after the following,

Range("d65536").End(xlUp).Offset(1, 0).Select

it goes to the last cell, then I get an error on the first line of your code.
Cells(Row, Column) = TextBox1.Value
Cells(Row, Column + 1) = TextBox2.Value
Cells(Row, Column + 2) = TextBox3.Value

Thanks again

Post Sun Sep 21, 2003 6:50 am 
 View user's profile Send private message

Ivan F Moala
MrExcel MVP


Joined: 11 Feb 2002
Posts: 3211
Location: Auckland, New Zealand
Flag: Newzealand

Status: Offline

 Reply with quote  

Re: Text Boxes and Last Empty Row

quote:
Originally posted by cfer:
Thanks Ivan, but I tried to incorporate it after the following,

Range("d65536").End(xlUp).Offset(1, 0).Select

it goes to the last cell, then I get an error on the first line of your code.
Cells(Row, Column) = TextBox1.Value
Cells(Row, Column + 1) = TextBox2.Value
Cells(Row, Column + 2) = TextBox3.Value

Thanks again


something like;

code:

Dim NextRow As Double

NextRow = Range("D65536").End(xlUp).Row

Cells(NextRow + 1, 4) = TextBox1.Value
Cells(NextRow + 1, 5) = TextBox2.Value
Cells(NextRow + 1, 6) = TextBox3.Value



_________________
Kind Regards,
Ivan F Moala From the City of Sails

Post Sun Sep 21, 2003 7:02 am 
 View user's profile Send private message Send e-mail Visit poster's website

cfer
Board Regular


Joined: 30 Jul 2002
Posts: 34


Status: Offline

 Reply with quote  

Re: Text Boxes and Last Empty Row

Thanks, I van, worked like a treat.

cfer

Post Sun Sep 21, 2003 2:24 pm 
 View user's profile Send private message

Noir
Board Master


Joined: 25 Mar 2002
Posts: 362

Flag: Usa

Status: Offline

 Reply with quote  

Re: Text Boxes and Last Empty Row

Where do you paste this code?

Noir

Post Mon Sep 22, 2003 3:29 pm 
 View user's profile Send private message

Noir
Board Master


Joined: 25 Mar 2002
Posts: 362

Flag: Usa

Status: Offline

 Reply with quote  

Re: Text Boxes and Last Empty Row

Nevermind, got it!

Noir

Post Mon Sep 22, 2003 3:34 pm 
 View user's profile Send private message
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.