开发者

Workbook.SaveAs() to different folder in Office 2011 for Mac

开发者 https://www.devze.com 2023-03-30 16:54 出处:网络
How to save xls to another folder? When I use \"/\" in save path it replaces 开发者_运维知识库then with \":\". When I try to use \"\\\" it saves the file with \"\\\" in file name.Use the Application.

How to save xls to another folder?

When I use "/" in save path it replaces 开发者_运维知识库then with ":". When I try to use "\" it saves the file with "\" in file name.


Use the Application.PathSeparator property and as an added bonus it'll be platform agnostic.

myPath = "myDirectory" & Application.PathSeparator & "mySubDirectory" & Application.PathSeparator & "myFileName"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号