Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am working on a macro that required the ability to loop through all the files in a folder. I did all my development work on a folder in the My Documents folder and got everything working correctly there. Then I started the process of moving the target folder to a sharepoint where all the real files lived. As soon as I did this and adjusted all the paths I immediately got an error message "Bad file name or number" from the following line: First, this is the line that worked on my local drive: 'sfname = Dir("C:\Documents and Settings\keithjo\My Documents\Test\*.xls") and this is the line that now produces the error: sfname = Dir("https://xx/yy/CIS/Shared Documents/*.xls") (I've replaced the xx and yy to get this on one line) I'm pretty sure the path is correct as I did a cut and paste from the address line in windows Explorer and I've tried both " " and "%20" in the space between Shared and Doucments but have not had an success yet. Any suggestions on what I might be missing? I can pist more code if needed but I'm pretty sure it is this one statement. TIA John Keith |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How add a site in "My SharePoint Sites€¯ folder of Favorite Links | Excel Discussion (Misc queries) | |||
Check for file in folder, if not there, open folder to rename file | Excel Programming | |||
Getting a list of files in a Sharepoint Folder | Excel Programming | |||
Save file in a new folder, but create folder only if folder doesn't already exist? | Excel Programming | |||
Need code to save file to new folder, erase from old folder | Excel Discussion (Misc queries) |