Buna,
Am un cod care imi deschide un fisier excel salvat pe SharePoint si imi copiaza in el date din alt fisier stocat local.
Problema este la salvare, fisierul SharePoint se deschide ReadOnly si nu pot salva fisierul in acelasi loc cu acelasi nume.
Dim strExcelFilePathOne As String
strExcelFilePathOne="https://.............xlsx"
Dim myApp As Excel.Application
Dim wkBk As Workbook
Set myApp = CreateObject("Excel.Application")
myApp.Visible = msoTrue
Set wkBk = myApp.Workbooks.Open(strExcelFilePathOne, ReadOnly = False)
wkBk.Sheets("TRANSLATION DETAILED COSTS&VOL").Activate
wkBk.Sheets("TRANSLATION DETAILED COSTS&VOL").Paste
Vreo sugestie?
VBA si fisiere SharePoint
-
- Mesaje:27
- Membru din:Joi Oct 18, 2018 3:07 pm
Re: VBA si fisiere SharePoint
Am gasit o solutie:
Dim strExcelFilePathOne As String
strExcelFilePathOne="https://.............xlsx"
Dim myApp As Excel.Application
Dim wkBk As Workbook
Set myApp = New Excel.Application
myApp.Visible = msoTrue
Set wkBk = myApp.Workbooks.Open(strExcelFilePathOne, UpdateLinks:=False, ReadOnly:=False)
wkBk.Sheets("TRANSLATION DETAILED COSTS&VOL").Activate
wkBk.Sheets("TRANSLATION DETAILED COSTS&VOL").Paste
Dim strExcelFilePathOne As String
strExcelFilePathOne="https://.............xlsx"
Dim myApp As Excel.Application
Dim wkBk As Workbook
Set myApp = New Excel.Application
myApp.Visible = msoTrue
Set wkBk = myApp.Workbooks.Open(strExcelFilePathOne, UpdateLinks:=False, ReadOnly:=False)
wkBk.Sheets("TRANSLATION DETAILED COSTS&VOL").Activate
wkBk.Sheets("TRANSLATION DETAILED COSTS&VOL").Paste