Results 1 to 11 of 11

Text Box not working in userform

Threaded View

  1. #1
    Registered User
    Join Date
    03-24-2016
    Location
    Nicaragua
    MS-Off Ver
    2016
    Posts
    40

    Text Box not working in userform

    Hello Excel Forum,

    Looking for help as usual. I am completing a file to look up employees info and to have the ability to add that info by clicking the option " Edit ". To complete that I am using a text box named "ID" that would find the ID value of the employee (which is a random number) and will give me the ability to edit the info.

    This is the code I am using...

    Somehow it seems that I have disabled the text box ID and it is not pulling up any results. I need help... Attached the file for reference

    Private Sub cmdEdit_Click()
    'error handler
    On Error GoTo cmdEdit_Click_Error
    'check that there is data to edit
    If Me.txtID = "" Then
    Call MsgBox("The fields are not complete", vbInformation, "Edit Contact")
    Exit Sub
    End If
    'find the value in case of duplicates we use an ID
    Set findvalue = Sheet1.Range("n8:n10000").Find(what:=Me.txtID, LookIn:=xlValues)
    'findvalue.Value = Me.txtID "we do not want to edit the ID"
    findvalue.Offset(0, -1).Value = Me.txtEmail.Value
    findvalue.Offset(0, -2).Value = Me.txtAddress.Value
    findvalue.Offset(0, -3).Value = Me.txtNeigborhood.Value
    findvalue.Offset(0, -4).Value = Me.txtPhone.Value
    findvalue.Offset(0, -5).Value = Me.txtSupervisor.Value
    findvalue.Offset(0, -6).Value = Me.txtNTlogin.Value
    findvalue.Offset(0, -7).Value = Me.txtOperatorID.Value
    findvalue.Offset(0, -8).Value = Me.txtContractorID.Value
    findvalue.Offset(0, -9).Value = Me.txtAvayaID.Value
    findvalue.Offset(0, -10).Value = Me.txtEmployeeID.Value
    findvalue.Offset(0, -11).Value = Me.txtFirstName.Value
    findvalue.Offset(0, -12).Value = Me.txtLastName.Value
    Call MsgBox("The contact has been updated", vbInformation, "Edit Contact")

    'reset error
    On Error GoTo 0
    Exit Sub
    'if error occurs then show me exactly where the error occurs
    cmdEdit_Click_Error:

    MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure cmdEdit_Click of Form PhoneList"
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to get information from Userform compiled to a Userform Text Box?
    By aabo1321 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-10-2015, 06:56 AM
  2. [SOLVED] Chart on Userform - not working
    By Lukael in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-09-2014, 02:54 PM
  3. Why Isn't My Userform Working?
    By drsadistic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2014, 11:18 PM
  4. [SOLVED] Userform: How do I use text/values from a spreadsheet to customize the userform?
    By bananajelly in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2014, 03:47 PM
  5. [SOLVED] Gradually Fade Userform Into View [Userform Fade Out Working Already]
    By nadstradamus in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-05-2013, 04:12 AM
  6. Alt+Tab not working when an userform is opened
    By sivdin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-28-2009, 06:34 AM
  7. Userform.Hide not working
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2005, 10:06 AM

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