【发布时间】:2021-02-26 00:38:17
【问题描述】:
我正在尝试使用 VBA 更新 sharepoint 文件,本质上这是一个员工将提交给他们的经理的计划,经理单击一个按钮来批准它,这应该更新位于 sharepoint 中的跟踪器。我在下面有我的代码,并指出了我卡在哪里。希望有人能指出我正确的方向!非常感谢。
Sub Approve_By_Manager()
Dim EmployeeName As String
EmployeeName = Workbooks("L&D Template.xlsm").Worksheets("Sheet1").Range("A3").Value
'Go to sharepoint, open L&D tracker as desktop app THIS IS WHERE I AM STUCK :(
'The file name from sharepoint is called L&D Tracker.xlsm
Dim rng As Range
Set rng = Workbooks("L&D Tracker.xlsm").Worksheets("2021-Q1").Range("B4", "B62")
For Each Cell In rng
If Cell.Value = EmployeeName Then
Cell.Offset(0, 1).Value = "Y"
Cell.Offset(0, 3).Value = "Y"
End If
Next Cell
End Sub
【问题讨论】:
标签: excel vba sharepoint