+ Reply to Thread
Results 1 to 12 of 12

Vlookup through 3 sheets from one lookup value result in all textbox in userform vba

Hybrid View

  1. #1
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Vlookup through 3 sheets from one lookup value result in all textbox in userform vba

    You'll have to line up the textbox numbers with the column numbers.
    Private Sub CommandButton1_Click()
    Dim Answer As Variant
    Dim A As Long
    Dim tmp
        Answer = TextBox1.Value
        If Answer <> "" Then
            For A = 2 To 37
            '=VLOOKUP(B2, B2:AQ165000,2,0)
            tmp = Application.VLookup(Val(Answer), Worksheets("Dispatchcalls").Range("B1:AQ16"), A - 1, False)
                Me.Controls("TextBox" & A).Value = tmp
             'so on and so forth for several other combo- and textboxes
            Next
        End If
    End Sub
    David
    (*) Reputation points appreciated.

  2. #2
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Re: Vlookup through 3 sheets from one lookup value result in all textbox in userform vba

    Dear sir

    Its Lookup range from dispatchcalls sheet only..
    but requirement is Onelookup value is through order no get result in to text from 3 sheets because order no in dispatch reflects into closed and cancel also..

    for e.g Order no 7005230838 is reflect in two dispatch & closedcalls also i want vlookup from dispatch for first 23s textbox then 11 textboxs from closedcalls.
    another example order no 7005233198 is reflect in three sheets i want vlookup from dispatch for first 23s textbox then 11 textboxs from closedcalls. then 2 textbos from cancelcalls..

    find the attachment....
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Using userform textbox value in code result
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-29-2013, 10:18 AM
  2. [SOLVED] VBA UserForm - Have entry in TextBox fill Another TextBox by VLOOKUP
    By msquared99 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2012, 10:24 PM
  3. Use textbox input and VLookup to update another textbox on same userform
    By gcoug in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-22-2011, 10:39 AM
  4. Display result in userform (vba) textbox
    By ilovelagar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2009, 04:47 PM

Tags for this Thread

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