+ Reply to Thread
Results 1 to 2 of 2

VLookup for when unloading information from Userform

  1. #1
    Registered User
    Join Date
    05-13-2013
    Location
    London
    MS-Off Ver
    Excel 2010 Mac
    Posts
    19

    VLookup for when unloading information from Userform

    Hi there,

    I've got a userform that I've finished and just putting the finishing touches on the transfer of data from userform onto an excel sheet, but I've come across a bit of a problem.

    I have a combo box that the person filling out the form can use to select a client. What I want to do is have a vlookup formula in my userform coding to tell the excel sheet being populated that when the client is being inserted into a cell, the next cell should have the rest of the information that it finds from the table.

    I've tried using:

    Sub EnterButton_Click()
    Dim a As Long
    Dim b As String

    With Worksheets("Master")

    a = .Range("C" & .Rows.Count).End(xlUp).Row + 1
    .Range("C" & a) = Requestor.Text
    b = .Range("D" & .Rows.Count).End(xlUp).Row + 1
    .Range("D" & b) = Application.WorksheetFunction.VLookup(Worksheets("Master").Range("C"), Worksheets("LookupLists").Range("ClientList"), 2, True)

    End Sub

    The error I've been getting is that there is a problem with Worksheets("Master").Range("C")

    I'd appreciate any help you could give me on this.

    Thanks.
    Last edited by kksf; 05-28-2013 at 09:47 AM.

  2. #2
    Registered User
    Join Date
    05-13-2013
    Location
    London
    MS-Off Ver
    Excel 2010 Mac
    Posts
    19

    Re: VLookup for when unloading information from Userform

    I have put the vlookup formula in quotation marks and it's worked!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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