-
Thanks, PhilB
Your code example confirmed that my code was actually correct, and I already knew that the file path was correct, so I began to wonder if VBA was having some problems with the path labels, since I had used quite long labels that included characters such as '#', '-', and 'space'. So I did some experiments.
Path length (up to 160 characters) and use of '-', and 'space' seemed to be OK.
However, it turns out that '#' is a problem. Though Vista is happy with '#' in file or folder names, it seems that in Excel VBA '#' acts as some sort of 'end-of-path' marker for folder names (file names seem OK). So if '#' is the first character of a folder name, that folder and anything to the right of it 'disappears' and you end up opening the folder to its left. If '#' is at some other point in the folder name, that name becomes unreadable and you get a fault message. So I solved my problem by using '%' rather than '#' in my folder names.
Once I got the code to work, your issue about 'Trusted folders' did indeed become an issue - I got warning messages about the dangers of running unknown files and had to agree to proceed. I can deal with this on my own system, but I would like to be able to send my XLSM file and it associated folder of PDFs to others to use, so: #### do you know any way of avoiding any recipient having to cope with that hassle?####
Many thanks for your help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules