O
OssieMac
Hi again,
One more test and then I am out of ideas. The path on the network is a
mapped path and I wonder if Excel sees it that way or whether it sees the
fully qualified path because it does do some funny things sometimes.
Copy the small macro below into a new workbook.
Change back from the VBA editor to Sheet1.
Go into File Open as if you are going to open a file and change into the
network folder (D:\costs or whatever folder you use) but do not open any
files. Close the fileopen window.
Run the Test_File_Path macro and then check the filepath in cell A1 on
Sheet1 and see whether it is the same as you have been using as the filepath.
If it is different, then try it as your filepath in the code.
Sub Test_File_Path()
Sheets("Sheet1").Range("A1") = CurDir
End Sub
If this does not work, then I suggest that you start a new thread on this
forum and post the code on it and describe what happens. Include the
information that it runs on your home computer but not on the network and
request that the MVP's look at it and see if they can tell you what is wrong.
Your suggestion is worth a thought but if it won't write to the spreadsheet
then I doubt that it will write to a txt file either.
Regards,
OssieMac
One more test and then I am out of ideas. The path on the network is a
mapped path and I wonder if Excel sees it that way or whether it sees the
fully qualified path because it does do some funny things sometimes.
Copy the small macro below into a new workbook.
Change back from the VBA editor to Sheet1.
Go into File Open as if you are going to open a file and change into the
network folder (D:\costs or whatever folder you use) but do not open any
files. Close the fileopen window.
Run the Test_File_Path macro and then check the filepath in cell A1 on
Sheet1 and see whether it is the same as you have been using as the filepath.
If it is different, then try it as your filepath in the code.
Sub Test_File_Path()
Sheets("Sheet1").Range("A1") = CurDir
End Sub
If this does not work, then I suggest that you start a new thread on this
forum and post the code on it and describe what happens. Include the
information that it runs on your home computer but not on the network and
request that the MVP's look at it and see if they can tell you what is wrong.
Your suggestion is worth a thought but if it won't write to the spreadsheet
then I doubt that it will write to a txt file either.
Regards,
OssieMac