View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter McNaughton Peter McNaughton is offline
external usenet poster
 
Posts: 5
Default VLookup error message while accessing range in closed workbook.

Hi
I am trying to access a Range in another (unopened) workbook by
creating a temporary range called "test" that I will later delete to
remove the Link. That is ok but I want to get the Price asociated
with "Angus" but get an error
"Unable to get the VLookup property of the Worksheet Function class"
The Vlookup function works if typed into the worksheet.

I would appreciate some helpful suggestions

Peter

Code follows:
ActiveWorkbook.Names.Add Name:="test", RefersTo:="='G:\[Price
List.xls]Price List'!$A$2:$B$53"
xxx = Application.WorksheetFunction.VLookup("Angus", test, 2, False)