Access a named cell in a closed workbook

  • Thread starter Thread starter Kaak
  • Start date Start date
K

Kaak

I want to access a named cell in a closed workbook.
Does anybody know how to do this
 
Hi Kaak!

Here's an example:

='C:\My Files\NewsGroups\Delete1 OK.xls'!MyNamedCell

Note the use of punctuation and the need for the full path name.

Best method of achieving this would be a point and click approach with
the workbook open. You'll see from the length of the reference, it's
not an ideal approach to use it in a complex formula as you'll soon it
the "formula too long" barrier.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Kaak,

I don't think you can access a closed workbook in VBA (well you can, but it
is hardly worth the effort). You need to open it and use it

Set oWB = workbooks.Open Filename:="C:\My Files\NewsGroups\Delete1
OK.xls"
Msgbox oWb.Range("MyNamedCell")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top