MarkFromSurrey
New Member
- Joined
- Mar 4, 2014
- Messages
- 2
So, been googling for ages now and not found anything that helps.
My situation is that I have a SharePoint list which is used to track project activities. The team update the SharePoint list and I have an Excel spreadsheet generated from one of the views of the list that is then used as a weekly report.
I have a Macro which lives in the Excel spreadsheet (let's call this the master WB) which updates the sheet, copies the contents to a new workbook and formats that as the report file (which then gets distributed - not all the recipients can have access to SharePoint).
Now, that all works well and I am happy with that, BUT I would like the original (Master WB) which lives on SharePoint to check itself back in to SharePoint to remove the need to do so manually.
So using something along the lines of:
ActiveWorkbook.Checkin True, "Some comment about checking in"
Will check the workbook in, BUT it will also immediately close the workbook, and stop processing any more VBA. Sometimes the comment is added to the version history, sometimes not.
I would like to check in and continue running the master workbook as there are a couple of things I would like the macro to do after checking in. I know I could move the checkin comment to the very end, but that does not really fit with the flow of what I am doing, and I don't like the idea of the code just being cut like that (rather than completing gracefully).
Is there a way to perform the check in without closing the file? I know I could do this from a different Excel Workbook (move the whole macro to another workbook and run against the master WB) but I would prefer not to do this, as if I (we) can get round the checkin and close issue then I have a few more situations where it would be really useful.
Thanks in advance for any help.
Regards,
Mark
My situation is that I have a SharePoint list which is used to track project activities. The team update the SharePoint list and I have an Excel spreadsheet generated from one of the views of the list that is then used as a weekly report.
I have a Macro which lives in the Excel spreadsheet (let's call this the master WB) which updates the sheet, copies the contents to a new workbook and formats that as the report file (which then gets distributed - not all the recipients can have access to SharePoint).
Now, that all works well and I am happy with that, BUT I would like the original (Master WB) which lives on SharePoint to check itself back in to SharePoint to remove the need to do so manually.
So using something along the lines of:
ActiveWorkbook.Checkin True, "Some comment about checking in"
Will check the workbook in, BUT it will also immediately close the workbook, and stop processing any more VBA. Sometimes the comment is added to the version history, sometimes not.
I would like to check in and continue running the master workbook as there are a couple of things I would like the macro to do after checking in. I know I could move the checkin comment to the very end, but that does not really fit with the flow of what I am doing, and I don't like the idea of the code just being cut like that (rather than completing gracefully).
Is there a way to perform the check in without closing the file? I know I could do this from a different Excel Workbook (move the whole macro to another workbook and run against the master WB) but I would prefer not to do this, as if I (we) can get round the checkin and close issue then I have a few more situations where it would be really useful.
Thanks in advance for any help.
Regards,
Mark
Last edited: