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
Bookmarks