View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Lucas Reece Lucas Reece is offline
external usenet poster
 
Posts: 18
Default Using VLookup on user form (VBA)

UPDATE:

I've added this to the vba code...

Private Sub cboPayrollNumber_Change()
Me.txtName = WorksheetFunction.VLookup(Me.cboPayrollNumber, _
Worksheets("Employees").Range("A:D"), 4, 0)
End Sub

Now, when I click on the new issue button I get this...

'Run-time error: '1004':
Unable to get the VLookup property of the WorksheetFunction class.

Any ideas please? Need resolving quite urgently now if someone could
help me out please.

Thank you.




On 10 Oct, 23:12, Lucas Reece wrote:
Of course. File can be downloaded fromhttp://sites.google.com/site/lucasreece/files.
Download issues.xls

Clicking on the new issue command button opens the user form. Issue ID
is automatically generated. Use the combo box to select an employee
payroll number which is taken from the Empoyees sheet. When a payroll
number has been selected, I need the name text box to display (using a
lookup maybe?) the name for the selected payroll number from the
Employees sheet.

Hope that makes sense.

Thanks.

On 10 Oct, 21:40, p45cal wrote:

Could you supply a cut down version of your workbook to save us having
to reproduce your scenario?


--
p45cal


*p45cal*
------------------------------------------------------------------------
p45cal's Profile:http://www.thecodecage.com/forumz/member.php?userid=558
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=143147