sleepersol
Technical User
Hello all,
I am new to the programming world and even newer to VBA and SharePoint. I am attempting to write a VBA script which will take the information from a number of spreadsheet templates which are stored on SharePoint and combine them into a master template spreadsheet which will also be stored on SharePoint. I can get the path to work when it is a file on my computer but it will not find the file when I enter the path to the SharePoint file that I get from the properties tab. It states that it is a bad file name or number. Any help
There are spaces in between the words in the file name. This is how it was listed in the properties page. I tried it with and without the spaces put in
Thanks in advance
I am new to the programming world and even newer to VBA and SharePoint. I am attempting to write a VBA script which will take the information from a number of spreadsheet templates which are stored on SharePoint and combine them into a master template spreadsheet which will also be stored on SharePoint. I can get the path to work when it is a file on my computer but it will not find the file when I enter the path to the SharePoint file that I get from the properties tab. It states that it is a bad file name or number. Any help
Code:
'This is how I have it mapped to the file on my computer
p = "D:\Users\yckpb\documents" 'This will be the W&I BU path
f = "W&I.xls" 'file
s = "Delivery" 'sheet
For r = 6 To 8
For c = 1 To 49
a = Cells(r, c).Address 'reference
Cells((r + nextCell), c) = GetValue(p, f, s, a)
Next c
Next r
There are spaces in between the words in the file name. This is how it was listed in the properties page. I tried it with and without the spaces put in
Code:
'This is how I attempted to map it to the file on SharePoint
'I removed some of the letters in the path for safety
p = "[URL unfurl="true"]http://a...3/s...s/w...p/H../L.../C../S...e%20T...g%"[/URL]
f = "Trng%20Plan%20MASTERR%20Template%2005_17_2011.xls" 'file
s = "Delivery" 'sheet
For r = 6 To 8
For c = 1 To 49
a = Cells(r, c).Address 'reference
Cells((r + nextCell), c) = GetValue(p, f, s, a)
Next c
Next r
Thanks in advance