Results 1 to 7 of 7

Run Time error 91 while updating texts in textbox in userform

Threaded View

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    UAE
    MS-Off Ver
    Excel 2003
    Posts
    12

    Run Time error 91 while updating texts in textbox in userform

    I have a userform with textboxes and listbox.

    All new values from my textbox I am able to add from textbox to an excel sheet.

    When it is coming for editing I am unable to update and save the edited data from textbox to that particular cell value.

    Following is my code for saving edited datas from textbox to particular sheet cell

    Privte sub button_save_Click()
    
          Dim Employee As Variant
          Dim Name As String
          Dim ws As Worksheet
          Set ws = Worksheets("hotel")
         
        
          
          Employee = Empty
          
          With ws.Range("c1:c900")
          
                Name = b.Value     ->     "// 'b' is the name of textbox
                
                
                Set Employee = .Find(what:=Name, LookIn:=xlValues)
                
                Employee.Rows.Offset(0, 0).Value = b.Value               "//While clicking save button after editing data in textbox I'm getting Run 
                                                                                                    time error 91 here
    
          
          End With
    
          Set Employee = Nothing
     
    End Sub
    ------------------------------------------------------------------

    While editing from "Ascot" to "Asco" I have no problem.
    But when I type any new alphabet in the textbox like from "Ascot" to "Ascot Royal" I get the Run time error 91 message.

    plz help. Thanks
    Last edited by Cutter; 08-22-2012 at 03:30 PM. Reason: Added code tags

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