Save as... on intranet

A

andy

The below code works well if I run the file from my
workstation, however when the same file is moved to an
intranet server, and when you click on the link for this
file, and submit (which runs the code), the code always
bombs on the Save as...

I have made sure that the folder on the server has read,
write permissions. Also I have tried a few syntax
variations but with no success.

How do you save a file on an Intranet server??? (UNC with
forward/slashes; with backward\slashes, using the URL
Http://; or something else)???

Dim wb As Workbook
Dim WBname As String

Application.ScreenUpdating = False
Set wb = ActiveWorkbook
WBname = wb.Name & " " & Format(Now, "dd-mm-yy") & ".xls"
wb.SaveCopyAs "d:/Insite/Temp" & WBname

Thank you in advance,
God bless you
 
P

Pete McCosh

Andy,

not sure about the ins and outs of your server, but if you
have read/write access, then you should be able to use the
PATH property of the workbook to get the right folder.
This will save the file in the same folder as the workbook
holding the code:

wb.saveas filename:= ThisWorkbook.path & "\Temp" & wbname

Cheers, Pete
 
Top