Results 1 to 10 of 10

Data Populating & Updating by Userform

Threaded View

  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 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
    Last edited by AliGW; 04-09-2018 at 06:28 AM. Reason: Code tags added.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [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
  2. 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
  3. 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
  4. Populating Userform data to another worksheet
    By BigSpeekaz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-13-2014, 04:14 AM
  5. 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
  6. Populating data into listbox based on 3 combo box's using a userform
    By Louis Dean in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2014, 06:39 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