excel vba check out and check in excel document
excel vba check out and check in excel document
(OP)
I am writing a macro that would:
check out a document from sharepoint
open a document on C drive
save (stack) the open document on the sharepoint document
close the file
check in the document.
my code is as follows:
Workbooks.CheckOut "https://site.com/J/TestingFile.xlsx"
Set wbTarget = Workbooks.Open("c:\theTestFile.xlsx")
wbTarget.SaveAs FileName:="https://site.com/J/TestingFile.xlsx"
wbTarget.CheckIn SaveChanges:=False, Comments:="updating file"
wbTarget.Close False
I keep getting an error when I check get to the checkin line:"we can't do that for you because the file is no longer checked out or has been deleted.".....but file is not deleted and I'm checking it in after it was checked out....any ideas?
check out a document from sharepoint
open a document on C drive
save (stack) the open document on the sharepoint document
close the file
check in the document.
my code is as follows:
Workbooks.CheckOut "https://site.com/J/TestingFile.xlsx"
Set wbTarget = Workbooks.Open("c:\theTestFile.xlsx")
wbTarget.SaveAs FileName:="https://site.com/J/TestingFile.xlsx"
wbTarget.CheckIn SaveChanges:=False, Comments:="updating file"
wbTarget.Close False
I keep getting an error when I check get to the checkin line:"we can't do that for you because the file is no longer checked out or has been deleted.".....but file is not deleted and I'm checking it in after it was checked out....any ideas?





RE: excel vba check out and check in excel document
CODE -->
Workbooks.CheckOut "https://site.com/J/TestingFile.xlsx" Set wbTarget = Workbooks.Open("c:\theTestFile.xlsx") wbTarget.SaveAs FileName:="https://site.com/J/TestingFile.xlsx" wbTarget.CheckInSaveChanges:=False,Comments:="updating file"wbTarget.Close FalseRE: excel vba check out and check in excel document
RE: excel vba check out and check in excel document
RE: excel vba check out and check in excel document
RE: excel vba check out and check in excel document
RE: excel vba check out and check in excel document
RE: excel vba check out and check in excel document
RE: excel vba check out and check in excel document