![]() |
updating spreadsheet from textbox
Hi,
I've created a userform that displays some employee info. Each sheet holds a different companies employee list. I've used two combobox, the first, lists company names, (also the sheet name), the second is the employee list within the sheet. I've used the following code to populate the form. Private Sub Cbitems_Change() Dim appexcel As Excel.Application Dim wks As Worksheet Dim choice As String choice = cbCompName.Value Set wks = worksheets(choice) Set appexcel = Application TextBox1.Text = Application.VLookup(CbEmplist.Text, wks.Range("A7:N200"), 2, True) ' information about the employee TextBox2.Text = Application.VLookup(CbEmplist.Text, wks.Range("A7:N200"), 3, True) etc. End sub What I'd now like to do is after amending the details in the textboxes send it back to its original position on the sheet. My problem is I don't know how the reference the starting range, ie the employee name. Once I establish that I was going to use OFFSET to add the other items of information. Hope this makes sense. Many thanks David |
All times are GMT +1. The time now is 12:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com