Open a workbook in VBA using UNC pathname

T

Tom Wikle

In VBA I need to open a workbook using the UNC pathname. Right now th
code is:
mfdate = FileDateTime("HG Equipment Tracking Matrix.xls")

I need to add the UNC pathname to the file name. Nothing seems to work
The UNC pathname is:
\\beavertn-nas-06\twikle\

What is the right code to make this work
 
J

john

In VBA I need to open a workbook using the UNC pathname. Right now the
code is:
mfdate = FileDateTime("HG Equipment Tracking Matrix.xls")

I need to add the UNC pathname to the file name. Nothing seems to work.
The UNC pathname is:
\\beavertn-nas-06\twikle\

What is the right code to make this work?


This just worked for me

Workbooks.Open
Filename:="\\10.1.1.91\finance\accounting\monthend\1209tb.xls"

(The above is one line. It wrapped in my newsreader.)


so if you substitute your path and filename it should work.

HTH
john
 

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

Top