ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBE file open coding (https://www.excelbanter.com/excel-programming/321875-vbe-file-open-coding.html)

Bill

VBE file open coding
 
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.

Lonnie M.

VBE file open coding
 
Hi, give this a try:
Workbooks.Open Filename:="C:\" & Range("j11").Value _
& "\" & Range("j39").Value & ".xls"

HTH--Lonnie M.


Bill

VBE file open coding
 


"Lonnie M." wrote:

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

HTH--Lonnie M.

Top guy - thanks buddy.






All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com