0

I'm running the following simple code:

Private Sub Workbook_BeforeClose(Cancel As Boolean)

If Workbooks(ThisWorkbook.Name).CanCheckIn = True Then Workbooks(ThisWorkbook.Name).CheckIn (SaveChanges = False)

End Sub

However, even I use the "SaveChanges = False" operator, the workbook saves all changes without fireing the "save prompt".

The goal: When closing the file, Excel should fire the save prompt. After that, it should just CheckIn the file without saving as it has been saved already with the save prompt before (if needed).

Thanks for your help,

Cheers Pete

braX
  • 11,506
  • 5
  • 20
  • 33
Pete
  • 1
  • Consider using Private Sub Workbook_BeforeSave method – barneyos Nov 14 '19 at 09:38
  • Hey Barneyos, not yet. However that would not work with the rest of my makro. As I also auto CheckOut whenever I open the file. Using Workbook_BeforeSave would mean, that if I dont save the workbook the file wouldnt Checkin again but I will give it a shot :). Thanks for your reply. – Pete Nov 14 '19 at 13:45

0 Answers0