View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Williams[_4_] John Williams[_4_] is offline
external usenet poster
 
Posts: 12
Default getting data from closed workbook

I've used the code you refer to and it works fine. Check very
carefully your filename in the line:

tArray = ReadDataFromWorkbook("C:\FolderName\SourceWbName.x ls",
"A1:B21")

The first argument must obviously refer to an Excel workbook on your
machine. If I give the wrong filename or folder path I get the
invalid file prompt followed by the type mismatch error.

If your workbook is in My Documents, it can be confusing to know the
precise folder path. The easiest way to determine this is using
Windows Explorer with the full path displayed in the address bar
(Tools Folder Options View tab check Display the full path in
the address bar).