In 10 minutes of searching the forums, I didn't find an answer to this question:
When I run this code, I get an error message, "Unable to get the VLookup property of the WorksheetFunction class". I know the individual arguments in that vlookup code are all correct; I can manipulate them each individually in the sub routine. Why can't excel find the Vlookup property (and why does it think its a property, not a method)?Sub DeCode() 'get the length of the text string in the textbox (codebox) CodeString = Worksheets("DeCoder").OLEObjects("Codebox").Object.Text CodeLength = Len(CodeString) For i = 1 To CodeLength BinaryString = Application.WorksheetFunction.VLookup(Mid(CodeString, i, 1), Range("Binary"), 3, False) MsgBox BinaryString Next i End Sub
thank you!
Last edited by Mervil; 11-19-2010 at 12:23 AM.
Hi Mervil,
Try just "Application.Vlookup" instead of "Application.WorksheetFunction.Vlookup"
Ok. What the heck. That worked! But WHY did that work? I thought vlookup was a worksheetfunction.
I think it technically is part of WorksheetFunction, but doesn't work when that is added to the code. ::shrug::
Just something I've come across when trying myself.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks