Bopo2
11-01-2009, 08:12 AM
Hey guys
A quick question, basically I'm using several vlookups to populate text boxes on my form with data, however once the user has editted that data, I want the values within the text boxes to save to the cell within the worksheet that they were first retrieved from.
For example
Me.txtname.Text = Application.VLookup(storeId, Worksheets("Customers").Range("CustomerRecords"), 2, 0)
Then when I click the save button, I want the value within the text box to be saved within the original cell. I gave this a try, obviously it didn't work.
Private Sub btnsave_Click()
Application.VLookup(storeId, Worksheets("Customers").Range("CustomerRecords"), 2, 0) = Me.txtname.Text
End Sub
Help appreciated.
A quick question, basically I'm using several vlookups to populate text boxes on my form with data, however once the user has editted that data, I want the values within the text boxes to save to the cell within the worksheet that they were first retrieved from.
For example
Me.txtname.Text = Application.VLookup(storeId, Worksheets("Customers").Range("CustomerRecords"), 2, 0)
Then when I click the save button, I want the value within the text box to be saved within the original cell. I gave this a try, obviously it didn't work.
Private Sub btnsave_Click()
Application.VLookup(storeId, Worksheets("Customers").Range("CustomerRecords"), 2, 0) = Me.txtname.Text
End Sub
Help appreciated.