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.
Bookmarks