VBA Code to open an Excel file on a sharepoint site
Now it works...
here you are the code:
Sub UseCanCheckOut()
Dim xlApp As Excel.Application
Dim wb As Workbook
Dim xlFile As String
xlFile = "http://test:8080/PWA/Project Documents/00 MS Excel
File/
BookTest.xls"
'Determine if workbook can be checked out.
If Workbooks.CanCheckOut(xlFile) = True Then
Workbooks.CheckOut xlFile
Set xlApp = New Excel.Application
xlApp.Visible = True
Set wb = xlApp.Workbooks.Open(xlFile, , False)
MsgBox wb.Name & " is checked out to you."
Else
' MsgBox "You are unable to check out this document at this
time."
End If
End Sub
cheers vit
|