Results 1 to 3 of 3

Help with code to have database userform add values to next empty row.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Help with code to have database userform add values to next empty row.

    Go easy on me, this is the very first userform and vba project I have written on my own. How do I write the code so that when the add button is clicked it adds the values in the form to the next empty row. Right now it just owerwrites the values in row 2.

    Private Sub cmdAdd_Click()
    Cells(2, 1).Value = frmauditdb.lstSupName.Value
    Cells(2, 2).Value = frmauditdb.txtPlantName.Value
    Cells(2, 3).Value = frmauditdb.txtLastAuditDate.Value
    Cells(2, 4).Value = frmauditdb.txtLastAuditScore.Value
    Cells(2, 5).Value = frmauditdb.lstAuditType.Value
    
    End Sub
    Last edited by dcgrove; 06-03-2010 at 05:17 PM.

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