LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default ChDrive error (server path)

I have a macro that goes through each file in the folder containing the
workbook and combines their contents together. I used to have this folder on
my computer and it worked fine. I have now moved this folder to a server on
our network, and am getting:

"Run Time Error '5', Invalid Procedure Call or argument."

The path is "\\xxxxx-s2\documents\Marcotte\....."

I recently got a new computer, which was one of the other servers (we used
to have 3, now we have 1). Before, I had to log onto the servers with a
username and password, but since the server/computer change I have not had to
do that.

Sub OpenAll()
'this macro compiles all sbt files in the current directory into a total file
'which can be used to create an IIF.
Dim myPath As String
Dim FNames As String
Dim fs As Object
Dim i As Integer
Dim DlySBTWkb As Workbook
Dim wkb As Workbook
Dim DlyLastRow As Single
Dim MlyLastRow As Single

myPath = ThisWorkbook.Path
ChDrive myPath '.......... <--- generates error
ChDir myPath

'More Code that does the actual work

End Sub

TIA,
Marcotte
 
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 do I get the true path to server (not mapped drive letter)? John Excel Worksheet Functions 2 May 18th 06 09:48 PM
Indirect does not recognize full server path? Matt Excel Worksheet Functions 3 January 6th 06 09:18 PM
Excel 2003 Error Cannot Locate the Internet Server or Proxy Server Seabee Excel Discussion (Misc queries) 0 November 20th 05 12:03 AM
How do I use a server name in an Excel chart file path? Zimtok5 Charts and Charting in Excel 1 October 26th 05 02:08 AM
Problems with ChDrive and ChDir Sophie Excel Programming 5 December 2nd 04 04:33 PM


All times are GMT +1. The time now is 02:55 AM.

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

About Us

"It's about Microsoft Excel"