Sharepoint Check out & Check in

Superstig666

New member
Joined
Oct 28, 2014
Messages
8
Reaction score
0
Points
0
Hi Folks

I have another problem! WizardofOz kindly pointed me in the direction of the Microsoft pages for assistance with Check out & Check in documents via VBA.

After some investigating and general searching I have managed to nearly get what I need but need asistance with the following

Please could someone advise how to change the following to apply to a number of other excel files on Sharepoint at the same time? i.e check out the file mentioned plus others named "Planning Team" for example

Sub test()
Dim docCheckOut As String
docCheckOut = "http://teamspace.intranet.group/sites/Teamsite/MI/Forcast Team.xls"
Call UseCheckOut(docCheckOut)
End Sub
Sub UseCheckOut(docCheckOut As String)
' Determine if workbook can be checked out.
If Workbooks.CanCheckOut(docCheckOut) = True Then
Workbooks.CheckOut docCheckOut
Else
MsgBox "Unable to check out this document at this time."
End If
End Sub

You've probably guessed the next question! What would the code be to then do the opposite i.e Check all the files back in (preferably bypassing the "do you need to add comments" pop up)

Many thanks as always!

Jamie
 
Back
Top