VBA Open Excel Workbooks in Teams as read/write

Douglas Prince 1 Reputation point
2022-02-09T08:42:16.093+00:00

Hello,

What is the VBA code for opening an Excel workbook that is saved in Teams as read/write?

I have found how to open a Workbook but it is READ only. If i make any changes i ned to save a copy.

Dim sPath as string

sPath = **** 'my location

Workbooks.Open sPath & "/Structures%20-%20Staff%20engagement%20tracker.xlsx?web=1)", , False

The above works for opening as read only. I have tried changing the optional parameters for ReadOnly to False, with no success.

Is there another way?

Regards,
Douglas

Microsoft 365 and Office Development Other
Developer technologies Visual Basic for Applications
Microsoft Teams Microsoft Teams for business Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Douglas Prince 1 Reputation point
    2022-02-16T13:34:34.313+00:00

    Hello,

    I removed the trailing "?web=!" and seems to have solved the issue.

    Regards,
    Douglas


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.