![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 8
|
This seems like a really simple thing to do, but I can't seem to do it without specifying an exact cell to move to.
Basically, I am creating a form to collect data and store it on an excel sheet. Each time the user presses the "continue" button on the form, it should go to a new row in the sheet storing the data, and input the new row of info. I can't work out how to get it to check for the next available row and then move to it to store the data. Sorry if this sounds long winded, but your help would be appreciated. Regards, Del |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: May 2002
Posts: 809
|
It's hard to give much specific advice, since you didn't give much specific behavior.
There is a Next property for Range, so you could do something like these: activecell.next.Select cells(Activecell.Row+1,1).select Open an Immediate window in VBA editor and see if either of this fit your needs. |
|
|
|
|
|
#3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
you have data basically like;
To see the formula in the cells just click on the cells hyperlink The above image was automatically generated by [HtmlMaker V1.20] If you want this code, click here and Colo will email the file to you. This code was graciously allowed to be modified: by Ivan F Moala All credit to Colo In order to get the Last row assuming 1) Data starts in Column A as above 2) Data is continuous Then something like this will give you the Next blank row to input data into. Dim dNxtRow As Long dNxtRow = Cells(Rows.Count, 1).End(xlUp).Row + 1 Cells(dNxtRow, 1) = "Your Data" _________________ Kind Regards, Ivan F Moala ![]() [ This Message was edited by: Ivan F Moala on 2002-05-12 11:25 ] |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
#4 |
|
New Member
Join Date: May 2002
Posts: 8
|
Thats great Ivan, thanks. Problem solved.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|