Results 1 to 24 of 24

Formula Problem - Help needed to autofill Userform if Data exists

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-10-2008
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    985

    Formula Problem - Help needed to autofill Userform if Data exists

    Hello,

    I have the Userform that is complete and it adds a record at the end of the table as designed -yet it would be nice if the Userform could auto populate the form with existing Employee Data if it already is there!

    Below is a copy of the Userform code

    
    
    Private Sub cmdCancel_Click()
        Unload Me
    End Sub
    Private Sub cmdOK_Click()
    ActiveWorkbook.Sheets("EmployeeData").Activate
    Range("A2").Select
    Do
    If IsEmpty(ActiveCell) = False Then
    ActiveCell.Offset(1, 0).Select
    End If
    Loop Until IsEmpty(ActiveCell) = True
    ActiveCell.Value = txtfullname
    ActiveCell.Offset(0, 0) = txtfullname.Value
    ActiveCell.Offset(0, 1) = txthiredate.Value
    ActiveCell.Offset(0, 2) = txtaht.Value
    ActiveCell.Offset(0, 3) = txtacw.Value
    ActiveCell.Offset(0, 4) = txtquality.Value
    ActiveCell.Offset(0, 5) = cbodepartments.Value
    ActiveCell.Offset(0, 6) = txtadherence.Value
    ActiveCell.Offset(0, 7) = txtvoc.Value
    ActiveCell.Offset(0, 8) = txtnps.Value
    ActiveCell.Offset(0, 9) = txtfcr.Value
    ActiveCell.Offset(0, 10) = cboteams.Value
    If chkActive = True Then
    ActiveCell.Offset(0, 10).Value = "Yes"
    Else
    ActiveCell.Offset(0, 11).Value = " "
    End If
    Range("A1").Select
    End Sub
    
    Private Sub FormBack_Click()
    
    End Sub
    
    Private Sub cmdreset_Click()
    txtfullname.Text = ""
    txthiredate.Text = ""
    txtaht.Text = ""
    txtacw.Text = ""
    txtquality.Text = ""
    cbodepartments.Text = ""
    txtadherence.Text = ""
    txtvoc.Text = ""
    txtnps.Text = ""
    txtfcr.Text = ""
    cboteams.Text = ""
    
    End Sub
    
    Private Sub UserForm_Initialize()
    
    End Sub
    Any help would be great!

    Best Regards,

    John
    Last edited by JJFletcher; 10-24-2014 at 11:33 AM. Reason: Wrong Title Descriptiion

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to get data entered in a form to auto populate into a calendar?
    By JMAE1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2014, 02:31 PM
  2. Auto Populate Form With Selected Email In VBA Userform
    By Jeffrey34 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-18-2014, 07:56 AM
  3. Auto populate vacation calendar dates per employee
    By boxermack in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-17-2013, 11:47 AM
  4. [SOLVED] How to auto-populate userform with appropriate data from spreadhseet
    By dheads in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2012, 04:38 PM
  5. [SOLVED] How to auto populate an invoice from data in an existing worksheet
    By juliebythesea in forum Excel General
    Replies: 4
    Last Post: 07-14-2006, 05:40 PM

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