Hi
When I run below, I get error 9 for the "Workbooks(xlsFile).CheckIn" command,
I have tried varios things but I cannot get it to work....anyone knows what is wrong ?
BR
/Tommy
Sub UseCanCheckOut()
Dim xlApp As Excel.Application
Dim wb As Workbook
Dim xlsFile As String
xlsFile = "http://workroom......../test.xls"
If Workbooks.CanCheckOut(xlsFile) = True Then
Workbooks.CheckOut xlsFile
Set xlApp = New Excel.Application
xlApp.Visible = True
Set wb = xlApp.Workbooks.Open(xlsFile, , False)
End If
If wb.CanCheckIn = True Then
Workbooks(xlsFile).CheckIn
End If
End Sub
When I run below, I get error 9 for the "Workbooks(xlsFile).CheckIn" command,
I have tried varios things but I cannot get it to work....anyone knows what is wrong ?
BR
/Tommy
Sub UseCanCheckOut()
Dim xlApp As Excel.Application
Dim wb As Workbook
Dim xlsFile As String
xlsFile = "http://workroom......../test.xls"
If Workbooks.CanCheckOut(xlsFile) = True Then
Workbooks.CheckOut xlsFile
Set xlApp = New Excel.Application
xlApp.Visible = True
Set wb = xlApp.Workbooks.Open(xlsFile, , False)
End If
If wb.CanCheckIn = True Then
Workbooks(xlsFile).CheckIn
End If
End Sub