Thread: VLookup
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
BigMac BigMac is offline
external usenet poster
 
Posts: 6
Default VLookup

Hi, I'm totally new to VBA, so I do need some help.

Been trying to do a Vlookup function on VBA, but I keep getting Error
1001: Application-defined or object-defined error. Here's my code:



Private Sub cmdFinduser_Click()

Dim MyRange As Long
Dim colNumber As Long

MyRange = Sheets("MemberList").Range("B:0").Text

txtName.Text = Application.WorksheetFunction.VLookup(txtFOM.Text,
MyRange, 4, False)

End Sub


Thanks for the help