Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SaveCopyAs Path

Status
Not open for further replies.
Apr 25, 2008
10
0
0
US
Hello

I'm trying to use VB.NET to save an open spreadsheet to a network drive and am receiving errors when run the code. Here's the line where the problem exists.

excelWorkbook.SaveCopyAs("//wsent01ts/callgrp/reports/Accts 120 ME.xls");

I can save it manually to this path: \\wsent01ts\callgrp\reports\Accts 120 ME.xls

Any ideas? Thanks!
 
Did you try using the backslashes, UNC style instead of the forward slashes?
 
Thanks for the idea. However, when I do that, it gives errors after each back slash saying something to the effect that an 'escape' had been found coded multiple times.
 
SaveCopyAs requires backslashes in a windows environment. Starting there what is the exact error message you are getting? Why is there a semicolon after the line? You are doing this in vb.net or are you doing it in c++/c#? Also at what point exactly in your code is that error popping up? The only way it should come up multiple times on that line is if you are looping through multiple files.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top