VBA代码将工作表上传到具有特定单元格中文件名的URL

时间:2018-12-07 01:36:01

标签: excel vba dropbox

希望有人可以提供帮助...我尝试了很多事情,但都失败了。

我想要一个vba代码,该代码将使用在单元格CV7中指定的名称和在单元格CY1中指定的URL保存启用了宏的工作表(名为“ MAR”的选项卡)。

CY1中的网址:https://spo.companyname.com/sites/MCoE/PS%20Dropbox/Forms/AllItems.aspx?RootFolder=%2Fsites%2FMCoE%2FPS%20Dropbox%2FU201%20%2D%20Olympic%20Games%2FParts%20Availability%20Reports%2FSURF%20END%2FMCoE%20%2B3%20%2D%20%2B12&FolderCTID=0x0120005428D9E115EDE145BDF8A5D10A2CBED7&View=%7BBA29F394%2DE412%2D49B8%2D8999%2D689C08597EE7%7D

Sub Save() 
    Dim path As String 
    Dim filename As String 
    path = "spo.companyname.com/sites/MCoE/PS%20Dropbox/Forms/…" 
    filename = path & Range("CV7") 
    Application.DisplayAlerts = False 
    ActiveWorkbook.SaveAs filename, FileFormat:=52, CreateBackup:=False 
    Application.DisplayAlerts = True
    ActiveWorkbook.Close
End Sub

有人可以帮忙吗?

谢谢! :)

0 个答案:

没有答案