修改当前Excel的链接数据源

Sub 宏1()
'
' 宏1 修改链接的数据源地址
'

'
    Application.Left = 437.5
    Application.Top = 171
    ActiveWorkbook.ChangeLink Name:="C:\Users\Administrator\Desktop\测试\数据源.xlsx" _
        , NewName:="C:\Users\Administrator\Desktop\测试\数据源 - 副本.xlsx", Type:= _
        xlExcelLinks
    Application.Left = 167.5
    Application.Top = 100
End Sub

 

posted @ 2023-04-23 09:18  vba是最好的语言  阅读(272)  评论(0编辑  收藏  举报