Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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)
  #2   Report Post  
Posted to microsoft.public.excel.programming
acw acw is offline
external usenet poster
 
Posts: 19
Default VLookup error message while accessing range in closed workbook.

Peter

Try
xxx = Application.WorksheetFunction.VLookup("Angus", Range

("test"), 2, False)


Tony


-----Original Message-----
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)
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The underlying connection was closed - Error Message Sandeep Excel Discussion (Misc queries) 1 August 3rd 07 11:02 AM
Help - Does value exist in range of CLOSED workbook? c mateland Excel Worksheet Functions 9 April 16th 07 06:53 PM
Accessing Data from Closed Workbook Wolf[_2_] Excel Programming 0 September 5th 03 09:39 PM
Accessing Data from Closed Workbook Andy Wiggins[_2_] Excel Programming 0 September 5th 03 06:42 PM
Accessing/Clearing range in hidden workbook DarrenW Excel Programming 2 July 17th 03 04:00 AM


All times are GMT +1. The time now is 01:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"