Getting run time error -2147467259 (80004005)

Vikram Mankar 1 Reputation point
2022-09-27T15:33:14.243+00:00

Hi,

I am using below code which is giving me Error: "This document cannot be checked in"

If ActiveWorkbook.CanCheckIn = True Then  
    ActiveWorkbook.Save  
    ActiveWorkbook.CheckIn  
End If  

Some help required

Best Regards,
Vikram.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,300 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 33,641 Reputation points Microsoft Vendor
    2022-09-28T06:24:12.957+00:00

    Hi @Vikram Mankar ,
    First you need to check if you have the right permission to the file. You could refer to the document about the error message.
    https://learn.microsoft.com/el-gr/office/troubleshoot/access/error-80004005-connecting-access-database
    Then you can set Require documents to be checked out before they can be edited to yes in Library settings -> Versioning settings
    245367-image.png
    Finally, the auto-save feature in this version of Excel is off by default. It might cause the error too.
    Please either turn Auto-save on or save the changes manually, wait and until the file is successfully saved and then Check in the file.
    245394-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.