+ Reply to Thread
Results 1 to 2 of 2

submiting from form to sheet

  1. #1
    Darren
    Guest

    submiting from form to sheet

    I am trying to take information froma user form and submit it to my sheet 1
    and every time a new record is entered it must go on to a new row. can anyone
    help?!

  2. #2
    Bob
    Guest

    RE: submiting from form to sheet

    Hi Darren
    Place the code in the userform of the button that you will be using to add
    the info

    Private Sub CommandButton1_Click()
    Dim nextrow As Integer
    nextrow = FirstBlankRow(1, 1)

    Cells(nextrow, 1) = txtEmployeeName
    Cells(nextrow, 2) = txtSSN
    Cells(nextrow, 3) = txtAddress
    Cells(nextrow, 4) = txtCity
    End Sub

    Function FirstBlankRow(KeyColumn As Integer, startrow As Long) As Long
    Dim i As Long

    i = 0
    Do While ActiveSheet.Cells(startrow + i, KeyColumn).Text <> ""
    i = i + 1
    Loop
    FirstBlankRow = startrow + i
    End Function

    Bob

    "Darren" wrote:

    > I am trying to take information froma user form and submit it to my sheet 1
    > and every time a new record is entered it must go on to a new row. can anyone
    > help?!


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1