Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2003 checkin method

Status
Not open for further replies.

kreplech

IS-IT--Management
Nov 16, 2007
18
0
0
US
Hello All,

I'm trying to run a macro that was written in Excel 2007 on a computer that is running Excel 2003.

Set wb = Workbooks.Open(path)

wb.Save

wb.Saved = True

wb.CheckIn <--- Err: Appilcation-defined or object-defined error

This code works perfectly using Excel 2007.

I've tried Workbooks.CheckIn(path) <-- Method or data member not found

Any ideas?
 



Hi,

Did you try checking VB Help?
Code:
'Example
'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.

Sub CheckInOut(strWkbCheckIn As String)

    ' Determine if workbook can be checked in.
    If Workbooks(strWkbCheckIn).CanCheckIn = True Then
        Workbooks(strWkbCheckIn).CheckIn
        MsgBox strWkbCheckIn & " has been checked in."
    Else
        MsgBox "This file cannot be checked in " & _
            "at this time.  Please try again later."
    End If

End Sub

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hey Skip,

Thanks for replying. I did try Workbooks(path).CheckIn and received a "Subscript out of range" error.

Odd, eh?

 

Is it checkable?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I'm not sure what you mean....

It passes CanCheckOut before CheckOut

I am not trying CanCheckIn before CheckIn since my script is responsible for having checked the document out beforehand.
 



I am not trying CanCheckIn before CheckIn since my script is responsible for having checked the document out beforehand.
Well maybe you should. Could not someone else have checked it IN since you checked it OUT?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
not possible. only one person can have a file checked out at a time. besides that, the error is repeatable with different workbooks.
 


I have no clue.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
i wound up finding a machine with office 2007 to run the script... oh well.
 



Sorry I couldn't help.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
no need for an apology. i appreciate the effort.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top