View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Pete at Sappi Fine Paper Pete at Sappi Fine Paper is offline
external usenet poster
 
Posts: 23
Default How do I access an unopened spreadsheet from a program?

Thanks John. Unfortunately this solution opens the spreadsheet in question,
which I am trying to avoid. It's a huge spreadsheet and takes forever to
open. I need to access the data in the spreadsheet without opening it.

"John.Greenan" wrote:

try this....

Sub test()

Dim x As Excel.Workbook

Set x = Workbooks.Open("c:\book4.xls")
End Sub

Swap "book4.xls" for your workbook name.

Good luck.

--
www.alignment-systems.com


"Pete at Sappi Fine Paper" wrote:

Hi folks.

The Workbooks keyword only seems to work for spreadsheets that are already
open. I can't seem to say, for example:

wkb = Workbooks("Y:\Downloads\6-7.xls")

So how do I refer to cells in that spreadsheet without opening it?

Any help would be much appreciated! :)

-Pete