ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   save file with macro - web folder (https://www.excelbanter.com/excel-programming/413709-save-file-macro-web-folder.html)

יריב החביב

save file with macro - web folder
 
Hello,

We save file after rearange it with macro.

Now, we want to cahnge the folder to save in to a web folder.

the macro run ok, but the file is not saved in the web folder.

here is the actual portion of macro,

please tell me where i wrong:


Kill ("desktop:\My Network Places\Entire Network\Microsoft Windows
Network\Tasmc1\focus\ Human Resources\sesyotmalam.xls")


ActiveWorkbook.SaveAs Filename:="desktop:\My Network Places\ Entire
Network\Microsoft Windows Network\Tasmc1\focus\ Human
Resourcessesyotmalam.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveWorkbook.Close

ErrorHandler:
If Err.Number = 53 Then
Resume Next
Else
Dim x As VbMsgBoxResult
x = MsgBox("Unhandled error#" & Err.Number & " in <sesyotmalam",
vbOKOnly, "Error")
End If

End Sub


Bernie Deitrick

save file with macro - web folder
 
yarivr,

Try using the path from the drive letter:

ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\USERNAME\Desktop\My Network Places\
Entire .....

HTH,
Bernie
MS Excel MVP


"???? ?????" wrote in message
...
Hello,

We save file after rearange it with macro.

Now, we want to cahnge the folder to save in to a web folder.

the macro run ok, but the file is not saved in the web folder.

here is the actual portion of macro,

please tell me where i wrong:


Kill ("desktop:\My Network Places\Entire Network\Microsoft Windows
Network\Tasmc1\focus\ Human Resources\sesyotmalam.xls")


ActiveWorkbook.SaveAs Filename:="desktop:\My Network Places\ Entire
Network\Microsoft Windows Network\Tasmc1\focus\ Human
Resourcessesyotmalam.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveWorkbook.Close

ErrorHandler:
If Err.Number = 53 Then
Resume Next
Else
Dim x As VbMsgBoxResult
x = MsgBox("Unhandled error#" & Err.Number & " in <sesyotmalam",
vbOKOnly, "Error")
End If

End Sub




יריב החביב

save file with macro - web folder
 
Thanks,

It is not work yet,

I get error mesege num 1004.

(as before)



--
תודה רבה


"Bernie Deitrick" wrote:

yarivr,

Try using the path from the drive letter:

ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\USERNAME\Desktop\My Network Places\
Entire .....

HTH,
Bernie
MS Excel MVP


"???? ?????" wrote in message
...
Hello,

We save file after rearange it with macro.

Now, we want to cahnge the folder to save in to a web folder.

the macro run ok, but the file is not saved in the web folder.

here is the actual portion of macro,

please tell me where i wrong:


Kill ("desktop:\My Network Places\Entire Network\Microsoft Windows
Network\Tasmc1\focus\ Human Resources\sesyotmalam.xls")


ActiveWorkbook.SaveAs Filename:="desktop:\My Network Places\ Entire
Network\Microsoft Windows Network\Tasmc1\focus\ Human
Resourcessesyotmalam.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveWorkbook.Close

ErrorHandler:
If Err.Number = 53 Then
Resume Next
Else
Dim x As VbMsgBoxResult
x = MsgBox("Unhandled error#" & Err.Number & " in <sesyotmalam",
vbOKOnly, "Error")
End If

End Sub






All times are GMT +1. The time now is 04:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com