![]() |
Edit Data by UserForm
Dear Friends. I have a userform and I made the following procedure to get the data in UserForm, its working fine, and I want to put one more button "EDIT" on the userform to edit the selected records. I dont know how to do this. pls help me out for this function. Option Explicit Dim i As Integer Private Sub ComboBox1_Change() i = ComboBox1.ListIndex 'Pass the current listindex to an Integer TextBox1.Value = ComboBox1.Column(1, i) 'This is column B TextBox2.Value = ComboBox1.Column(2, i) 'This is column C End Sub Private Sub CommandButton1_Click() Unload Me End Sub Private Sub UserForm_Initialize() ComboBox1.RowSource = "A1:C10" ComboBox1.SetFocus End Sub Please advise me how to Edit records..... Regards. Shahzad |
All times are GMT +1. The time now is 09:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com