Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this code:
Private Sub cmdOk_Click() Select Case iOption Case 1 'Save Changes and check in Application.ActiveWorkbook.Save Application.ActiveWorkbook.CheckIn SaveChanges:=True, _ Comments:=Me.txtNotesOnVersion, MakePublic:=False Case 2 'Discard changes and undo check out Application.ActiveWorkbook.CheckIn False Application.ActiveWorkbook.Close False Case Else 'Shouldn't happen unless there is a problem with the code Call MsgBox("Error! Unable to determine what option was choosen. " _ & "Please inform " & conAppAuthor, vbCritical + vbOKOnly, conAppName) End Select End Sub ------ It's giving me the error: Method 'CheckIn' of object '_workbook' failed When I attempt to run it. It is failing at the in the option 1 code for the checkin method. If I take the same code and run it from the debug window it works fine. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I got this to work if I ran the code in a separate function. The way it
was, it was being run from a command button on a userform. Could anyone explain why that makes it fail? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Method Add of object Validation Failed - please help | New Users to Excel | |||
Method Add of object Validation Failed - please help | Excel Worksheet Functions | |||
Sort method of Range Object Failed | Excel Programming | |||
method of axes of object failed | Excel Programming | |||
Method ~ of Object ~ Failed. | Excel Programming |