Results 1 to 7 of 7

Userform Button to Add Data to an Existing Table

Threaded View

  1. #1
    Registered User
    Join Date
    06-20-2012
    Location
    teachers, hethoz
    MS-Off Ver
    Excel 2010
    Posts
    4

    Userform Button to Add Data to an Existing Table

    I'm creating a userform that needs to update to an existing excel tabel named "CFSData"<BR><BR>I have a submit button (cmdSubmit) that I currently have the following vba for:
    Private Sub cmdSubmit_Click() 
        Dim nextrow As Integer 
         'countA function
        nextrow = WorksheetFunction.CountA(Sheets("Data").Range("A:A")) + 1 
        Sheets("data").Cells(nextrow, 1) = Now 
        Sheets("data").Cells(nextrow, 2) = frmCFSTracker.comboMgr.Value 
        Sheets("data").Cells(nextrow, 3) = frmCFSTracker.comboSup.Value 
        Sheets("data").Cells(nextrow, 4) = frmCFSTracker.comboSpecialist.Value 
        Sheets("data").Cells(nextrow, 5) = frmCFSTracker.comboBehavior.Value 
        Sheets("data").Cells(nextrow, 10) = frmCFSTracker.txtTime.Value 
        Sheets("data").Cells(nextrow, 18) = frmCFSTracker.optTotalAHT.Value 
        Sheets("data").Cells(nextrow, 19) = frmCFSTracker.optCSAT.Value 
        Sheets("data").Cells(nextrow, 20) = frmCFSTracker.optTransfers.Value 
        Sheets("data").Cells(nextrow, 21) = frmCFSTracker.optCustIR.Value 
    
    End Sub
    I found that this can only add data to the worksheet (named: "data") which contains the table (CFSData) I would actually like the data to go into .. I need the data to be inserted into the table instead of adding additional rows outside of it...
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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