Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   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

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   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

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   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

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   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

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   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


Reply
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 12:07 AM.

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"