+ Reply to Thread
Results 1 to 3 of 3

loading of pictures from MS Teams folder in userform

  1. #1
    Registered User
    Join Date
    06-29-2022
    Location
    Germany
    MS-Off Ver
    365
    Posts
    2

    loading of pictures from MS Teams folder in userform

    Hi,

    Is it actually possible for Excel to load pictures into a userform, which are stored in a shared MS Teams (Sharepoint) folder?

    I am working on a userform which loads a .jpg picture based on a number in a cell, but I only get it working if the jpgs are stored either on regular network folder or my harddrive.

    It would be really helpfull if anyone knows a way this can be done, or can clarify that this is indeed not possible. Thank you.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: loading of pictures from MS Teams folder in userform

    Assuming you have access to the site it should be possible.
    The LoadPicture command does not appear to be able to handle UNC paths, which mean mapping the path to a drive.


    Please Login or Register  to view this content.
    In the example code you need to get the correct address to the team site.
    I find the easiest way is to open an excel file in the correct location. Then use ?Activeworkbook.fullname in the immediate window.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    06-29-2022
    Location
    Germany
    MS-Off Ver
    365
    Posts
    2

    Thumbs up Re: loading of pictures from MS Teams folder in userform

    Quote Originally Posted by Andy Pope View Post
    Assuming you have access to the site it should be possible.
    The LoadPicture command does not appear to be able to handle UNC paths, which mean mapping the path to a drive.


    Please Login or Register  to view this content.
    In the example code you need to get the correct address to the team site.
    I find the easiest way is to open an excel file in the correct location. Then use ?Activeworkbook.fullname in the immediate window.

    Hi Andy,

    sorry for replying so late, but the forum went down the same day. Lucky for me your reply was sent to me by the automatic post notification email!
    I tried your solution and it worked like charm. To always get the correct Sharepoint address the following command is working:
    Please Login or Register  to view this content.
    During testing it also helped a lot to make a button which deletes the temporary network drive, so to avoid the error message "this drive already exists".

    Adding and instantly deleting a temporary network drive to get Exel to load pictures from Sharepoint feels a bit like using a sledgehammer to crack a nut, though.


    Thank you very much for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA to upload file to MS Teams folder
    By bluphoto in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2020, 12:30 PM
  2. Selective Loading of Linked Pictures
    By Statto in forum Excel General
    Replies: 1
    Last Post: 06-28-2017, 02:08 AM
  3. [SOLVED] Loading pictures into userform as per selection vba
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-05-2014, 07:39 PM
  4. loading all files from folder
    By jharaldson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-29-2012, 06:38 PM
  5. Loading Pictures in Image box
    By Troubled User in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-14-2006, 11:10 PM
  6. problems loading network folder
    By Phil Tukey in forum Excel General
    Replies: 2
    Last Post: 08-11-2005, 03:05 PM
  7. Loading multiple text files from a folder
    By girish sankar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-22-2005, 02:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1