VBE file open coding

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to write a vbe macro to look in cell J11 for a directory path,
then goto a file name found in cell J40.
I have this so far:

Open Filename
"C:\" & Range("j11").Value _
& "\" & Range("j39").Value & ".xls"

I am sure the bottom 2 line are ok, it is the first one that ia a problem.
Please can someone help with this nice easy one.
 
Hi, give this a try:
Workbooks.Open Filename:="C:\" & Range("j11").Value _
& "\" & Range("j39").Value & ".xls"

HTH--Lonnie M.
 
Lonnie M. said:
Hi, give this a try:
Workbooks.Open Filename:="C:\" & Range("j11").Value _
& "\" & Range("j39").Value & ".xls"

HTH--Lonnie M.

Top guy - thanks buddy.
 

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