Closed Thread
Results 1 to 2 of 2

Data Populating & Updating by Userform

  1. #1
    Forum Contributor
    Join Date
    07-27-2017
    Location
    Dhaka
    MS-Off Ver
    MS Excel 2019/ 64 bit
    Posts
    159

    Data Populating & Updating by Userform

    Dear Expert,
    Below is my vlookup code & now again i replacing my data to their origin cell after editing/changing. then what will be my revise code? please help me.

    Private Sub ComboBox1_Change()
    Dim ws As Worksheet, n As Long
    Set ws = Sheets("Sheet2")
    If Me.ComboBox1 = "" Then
    MsgBox "Please select a style name."
    Exit Sub
    End If
    For n = 1 To 10
    Me("TextBox" & n).Value = WorksheetFunction.VLookup(Me.ComboBox1.Value, ws.Range("AE:AO"), n + 1, False)
    Next
    End Sub


    Private Sub UserForm_Initialize()
    Dim rngList
    Me.ComboBox1.Clear
    With Sheets("Sheet2")
    Set rngList = .Range("AE2:AE" & .Cells(.Rows.Count, 31).End(xlUp).Row)
    If rngList.Rows.Count > 1 Then
    Me.ComboBox1.List = Application.Transpose(rngList)
    Else
    Me.ComboBox1.AddItem rngList
    End If
    End With
    End Sub

    Best Regards
    Wahid

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Data Populating & Updating by Userform

    Duplicate closed.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Data Populating & Updating by Userform
    By rachelwahid in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-12-2018, 12:51 AM
  2. [SOLVED] Userform ComboBox populating Comboboxes from worksheet data
    By bbqqsmokeman in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-22-2017, 08:42 PM
  3. Populating My Userform Boxes with the Data I'm Editing
    By cmoore24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2015, 09:28 AM
  4. UserForm Auto populating data from a worksheet
    By Rob.Marchel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-05-2015, 12:16 AM
  5. Populating Userform data to another worksheet
    By BigSpeekaz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-13-2014, 04:14 AM
  6. Populating a Userform from data in a listbox
    By needhelpinexcelvba in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-05-2014, 10:15 AM
  7. Replies: 4
    Last Post: 11-28-2012, 06:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1