Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I'm trying to write a macro on an excel file that open another excel file (stored on a sharepoint site), copy and paste some data... the problem is to open the file stored in the sharepoint site... I'm using this: Application.FollowHyperlink "http://test:8080/PWA/Project Documents/00 MS Excel File/Direct Cost Summary.xls", , , True the problem is that in this way I'm opening the file in "Read Only"... where, in the VBA can I set this value???? thanks all Cheers Vit |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have foud it....
Workbooks.CanCheckOut.... thanks anyway cheers Vit On Sep 4, 9:57*am, Vit wrote: Hi all, I'm trying to write a macro on an excel file that open another excel file (stored on a sharepoint site), copy and paste some data... the problem is to open the file stored in the sharepoint site... I'm using this: Application.FollowHyperlink "http://test:8080/PWA/ProjectDocuments/00 MS Excel File/Direct Cost Summary.xls", , , True the problem is that in this way I'm opening the file in "Read Only"... where, in the VBA can I set this value???? thanks all Cheers Vit |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi all again...
I have some problems..... here you are the VBA code that I'm using.... Sub UseCanCheckOut() Dim xlFile As String xlFile = "http://Test:8080/PWA//Project Documents/00 MS Excel File/ Direct Cost Summary.xls" ' Determine if workbook can be checked out. If Workbooks.CanCheckOut(xlFile) = True Then Workbooks.CheckOut xlFile Application.FollowHyperlink "http://usa-apps:8080/PWA/QBT - PM Process 2/Project Documents/00 MS Excel File/Direct Cost Summary.xls", , , True Else MsgBox "You are unable to check out this document at this time." End If End Sub with this code I can Check Out the File (I can see it on the WorkSpace...), but when I'm going to open with application.followhyperlink, it still opens the file in "Read Only".... how can I open the file and edit it??? thanks Vit On Sep 4, 11:14*am, Vit wrote: I have foud it.... Workbooks.CanCheckOut.... thanks anyway cheers Vit On Sep 4, 9:57*am, Vit wrote: Hi all, I'm trying to write a macro on an excel file that open another excel file (stored on a sharepoint site), copy and paste some data... the problem is to open the file stored in the sharepoint site... I'm using this: Application.FollowHyperlink "http://test:8080/PWA/ProjectDocuments/00 MS Excel File/Direct Cost Summary.xls", , , True the problem is that in this way I'm opening the file in "Read Only"... where, in the VBA can I set this value???? thanks all Cheers Vit- Hide quoted text - - Show quoted text - |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi all again...
I have some problems..... here you are the VBA code that I'm using.... Sub UseCanCheckOut() Dim xlFile As String xlFile = "http://Test:8080/PWA//Project Documents/00 MS Excel File/ Direct Cost Summary.xls" ' Determine if workbook can be checked out. If Workbooks.CanCheckOut(xlFile) = True Then Workbooks.CheckOut xlFile Application.FollowHyperlink xlFile, , , True Else MsgBox "You are unable to check out this document at this time." End If End Sub with this code I can Check Out the File (I can see it on the WorkSpace...), but when I'm going to open with application.followhyperlink, it still opens the file in "Read Only".... how can I open the file and edit it??? thanks Vit On Sep 4, 11:14*am, Vit wrote: I have foud it.... Workbooks.CanCheckOut.... thanks anyway cheers Vit On Sep 4, 9:57*am, Vit wrote: Hi all, I'm trying to write a macro on an excel file that open another excel file (stored on a sharepoint site), copy and paste some data... the problem is to open the file stored in the sharepoint site... I'm using this: Application.FollowHyperlink "http://test:8080/PWA/ProjectDocuments/00 MS Excel File/Direct Cost Summary.xls", , , True the problem is that in this way I'm opening the file in "Read Only"... where, in the VBA can I set this value???? thanks all Cheers Vit- Hide quoted text - - Show quoted text - |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot Table Source Link changed when file saved to SharePoint site | Excel Discussion (Misc queries) | |||
Having problems saving pdf's from excel to a sharepoint site. | Excel Programming | |||
Possible to import data from spreadsheets on sharepoint site? | Excel Discussion (Misc queries) | |||
Can a Macro open workbooks on a SharePoint Site? | Excel Discussion (Misc queries) | |||
Open excel file from password protected Intranet site(IE) | Excel Programming |