PC Review


Reply
Thread Tools Rate Thread

Edit Data by UserForm

 
 
Shazi
Guest
Posts: n/a
 
      21st Jul 2008

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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit exsisting data with userform =?Utf-8?B?R2Vv?= Microsoft Excel Misc 2 1st Oct 2007 07:38 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com Microsoft Excel Programming 3 6th May 2005 05:44 PM
Edit userform lostthought Microsoft Excel Programming 8 18th Aug 2004 06:59 PM
Multiple Userform Hold Data to edit bg18461 Microsoft Excel Programming 2 4th Jun 2004 03:10 AM
Edit a userform gregork Microsoft Excel Programming 1 7th Feb 2004 01:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:31 PM.