PDA

View Full Version : Solved: Copy data into next empty cell



ThePigeon
02-05-2009, 06:54 PM
(Using vba with excel 2007)

hey.

Sorry to post two threads in such quick succession.... but well I really need help if you can spare it....
I’ve been making this quiz which I’ve mostly finished. I’ve got all my radio buttons outputting the results to a selection of cells. Now what I want to do is make it so when I press a “save” command button the information in the results cells are automatically stored into the next empty cells in an assigned column in another workbook, thus making a database in the other workbook. I wonder could anybody help me out with this?
Cheers,
Joe.

duluter
02-05-2009, 07:05 PM
Does this link help? Comment #3 looks promising.

http://www.xtremevbtalk.com/showthread.php?t=35702


Duluter

ThePigeon
02-05-2009, 07:09 PM
yeh good find i'll give it a try

ThePigeon
02-05-2009, 07:15 PM
works a treat :P :D cheers for that!

now i got the cell slected, i gotta entre the data.... i'll think i can do this on my own, but i won't close the thread just yet.....

duluter
02-05-2009, 07:18 PM
This is officially the first time I've ever helped anyone on a programming message board! It's quite a joyful feeling.


Duluter

Simon Lloyd
02-05-2009, 07:35 PM
duluter, be careful or you will be addicted like the rest of us! ;)

ThePigeon, go ahead and mark this thread solved as your initial query was solved. You can post as many questions as you need don't worry, thats what we are here for!

ThePigeon
02-05-2009, 07:52 PM
done it.... cheers for the help!

regards,

Joe.

ThePigeon
02-05-2009, 07:53 PM
:P cheers guys.

mdmackillop
02-06-2009, 05:30 AM
The solutions suggested are generally checking from the top. This can cause errors if the data is not "solid". It is safer working from the bottom up.

Sub NextEmpty()
Dim Rng As Range
Set Rng = Sheets(2).Cells(Rows.Count, 1).End(xlUp).Offset(1)
ActiveCell.Copy Rng
End Sub