Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Workbooks.Open fails when using a full network path....

Hi there. I've got some code that does various things, among them,
opening an Excel file. Here's a little snippet of relevant code:

FilePath = "\\servername\share\folder\"
FileName = "template.xls"

Set aXL = CreateObject("Excel.Application")
With aXL
.Visible = False
.Workbooks.Open FilePath & FileName
End With

Here's the problem. When I run this on a machine using Office 2000, it
works just fine. When I run in on a machine using Office 2003, it gives
me this error:

"Open Method of Workbooks class failed"

Now... on Office 2003, if I change the "FilePath" to the *mapped*
network drive for the same folder (i.e. "S:\folder\"), then the code
works just fine. It's only when I try to use the full network path of
the same location that the code fails. But it works either way on
Office 2000. I need to be able to use the full path so this can be run
on different machines that may not have the same share mapped to the
same drive letter.

My question is, is this due to some kind of new network security
setting in Office 2003? If not, is there something else that would be
causing this?

WATYF

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Workbooks.Open fails when using a full network path....

Hi,

using WinXP, Office2003

I cannot reproduce the behaviour. In other words, I am able to open
workbook using this statement:

workbooks.Open filename:="\\unxcz0002\common\controlling\TC file
specification.xls"

Are you sure you have correct path?

Regards,
Ivan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Workbooks.Open fails when using a full network path....

Yeah... I'm sure on the path. And if I change it to a bad path, I get a
totally different error (file cannot be found. check your spelling,
etc.)

Btw, when you ran your test, did you run it from within Excel and just
use the Workbooks.Open method, or did you run it from somewhere else
(VB app, Word, etc) and create a late-bound instance of Excel (like in
my example)?


WATYF

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Workbooks.Open fails when using a full network path....

Hi,

I used late binding, Word.

Regards,
Ivan

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to see full path name of open workbook? Joe User[_2_] Excel Discussion (Misc queries) 5 March 21st 10 08:29 PM
Names of workbooks - want relative, with no Full Path Gdareos[_2_] New Users to Excel 1 April 21st 08 12:08 AM
Workbooks.Open with out full path help needed. dk_ Excel Discussion (Misc queries) 5 November 16th 06 02:40 AM
Open Workbook using URL instead of network path Raul Excel Programming 5 March 1st 06 03:53 PM
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed Frank Jones Excel Programming 2 June 15th 04 03:21 AM


All times are GMT +1. The time now is 12:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"