Can I do this?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created an input text boxes to collect name and social
security number on worksheet1. Then click on a command
button to transfer the name and SSN to worksheet2 and
then leave worksheet 1 blank for the next person to sign
up.

I want to use the single input form on worksheet 1 to
build a database on worksheet 2.

Can I do this?

Thanks
Jim
 
Sure.

When you press the button, find the bottom of the data with

Private Sub CommandButton1_Click()
with Worksheets("Sheet2")
set rng = .Cells(rows.count,1).End(xlup)
End with
With worksheets("Sheet1")
rng.offset(1,0).Value = .Textbox1.Text
.Textbox1.Text = ""
rng.offset(1,1).Value = .Textbox2.Text
.Textbox2.Text = ""
End With
End Sub
 
You could create two ranges in (collection of cells in a column) , everytime find the last cell with information and add the new information.

There could be two text boxes on the form which you could map with the corresponding ranges on sheet2. Also you could hide sheet2 so that no one could see the data

Another suggestion (Why dont you do the same thing in Access)
 
Thanks!!
-----Original Message-----
Sure.

When you press the button, find the bottom of the data with

Private Sub CommandButton1_Click()
with Worksheets("Sheet2")
set rng = .Cells(rows.count,1).End(xlup)
End with
With worksheets("Sheet1")
rng.offset(1,0).Value = .Textbox1.Text
.Textbox1.Text = ""
rng.offset(1,1).Value = .Textbox2.Text
.Textbox2.Text = ""
End With
End Sub


--
Regards,
Tom Ogilvy




.
 

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

Back
Top