LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Source Link changed when file saved to SharePoint site Barb Reinhardt Excel Discussion (Misc queries) 0 November 6th 07 07:55 PM
Having problems saving pdf's from excel to a sharepoint site. Ben H. Excel Programming 2 October 16th 07 05:24 AM
Possible to import data from spreadsheets on sharepoint site? Sharepoint newbie Excel Discussion (Misc queries) 0 July 2nd 07 02:14 PM
Can a Macro open workbooks on a SharePoint Site? Randy Excel Discussion (Misc queries) 0 August 29th 06 07:21 PM
Open excel file from password protected Intranet site(IE) Dan McCollick Excel Programming 4 May 17th 06 07:37 PM


All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"