|Excel Developer Reference|
expression.CheckIn(SaveChanges, Comments, MakePublic)
expression A variable that represents a Workbook object.
|SaveChanges||Optional||Variant||True saves changes and checks in the document. False returns the document to a checked-in status without saving revision.|
|Comments||Optional||Variant||Allows the user to enter check-in comments for the revision of the workbook being checked in (applies only if SaveChanges equals True).|
|MakePublic||Optional||Variant||True allows the user to publish the workbook after it has been checked in. This submits the workbook for the approval process, which can eventually result in a version of the workbook being published to users with read-only rights to the workbook (applies only if SaveChanges equals True).|
This example checks the server to see if the specified workbook can be checked in. If it can, the code saves and closes the workbook and checks it back in to the server.
|Visual Basic for Applications|