How to load images on Sharepoint to as image control


Good afternoon
I made a form in Microsoft Forms, so that they send me cell phone pictures.
These images come to me with a Sharepoint link, for example:

What happens is that the image that is downloaded is black. If I test it with any image from the internet, it works fine.
I think the fact is that the image is on Sharepoint and the link I receive cannot be accessed externally.

Can anyone help me resolve this issue? Thank you for your help

Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" _
    Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, _
    ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

Sub CommandButton1_Click()
    Dim imgsrc As String
    Dim dlpath As String
    dlpath = "C:\Meu_Backup\"
    URLDownloadToFile 0, imgsrc, dlpath & "HK Skyline.jpg", 0, 0
    Form_01_Entrada.MultiPage1.Pages(2).Image4.Picture = LoadPicture("C:\Meu_Backup\HK Skyline.jpg")
End Sub
0 Replies