Hi,
I have been looking around and seen several variations on what I am attempting, but nothing really specifically like what I am doing.
In short, I have a userform that allows users to select a group ID (Branch number) and a Bio of the manager and several data trends for that branch are displayed. I have been asked to add an image of the Branch Manager to the form.
I can get it to work when I have the images saved to a network or local drive, but I have to post the workbook to our SharePoint system. That means that I have to reference a group of images on SharePoint, which is where I am having the problem.
It keeps giviing me a "Run-time error '75": Path/File access error" when I attempt to pull from the SharePoint data.
I suspect that it may be some sort of security issue, but I cannot think of a way to test that out completely.
So far, the code looks like this:
Any help would be greatly appreciated! TIA!
I have been looking around and seen several variations on what I am attempting, but nothing really specifically like what I am doing.
In short, I have a userform that allows users to select a group ID (Branch number) and a Bio of the manager and several data trends for that branch are displayed. I have been asked to add an image of the Branch Manager to the form.
I can get it to work when I have the images saved to a network or local drive, but I have to post the workbook to our SharePoint system. That means that I have to reference a group of images on SharePoint, which is where I am having the problem.
It keeps giviing me a "Run-time error '75": Path/File access error" when I attempt to pull from the SharePoint data.
I suspect that it may be some sort of security issue, but I cannot think of a way to test that out completely.
So far, the code looks like this:
Code:
Private Sub get_picture()</SPAN></SPAN>
Dim EmpFound As Range
Dim FileNameBSM As String
With Range("bsm")</SPAN></SPAN>
Set EmpFound = .Find(txtBranchSalesManager.Value)</SPAN></SPAN>
If EmpFound Is Nothing Then</SPAN></SPAN>
MsgBox "Employee not found"</SPAN></SPAN>
txtBranchSalesManager.Value = ""</SPAN></SPAN>
Else</SPAN></SPAN>
FileNameBSM = Sheets("Data").Cells(8, 3).Value</SPAN></SPAN>
img_BSM.Picture = LoadPicture _</SPAN></SPAN>
("</SPAN>[URL]http://intranetSite/RetailAdminProj/Documents/Pictures/[/URL]" & FileNameBSM & ".jpg")</SPAN></SPAN>
img_BSM.PictureSizeMode = fmPictureSizeModeZoom</SPAN></SPAN>
On Error GoTo 0</SPAN></SPAN>
End If</SPAN></SPAN>
End With</SPAN></SPAN>
Set EmpFound = Nothing</SPAN></SPAN>
Exit Sub</SPAN></SPAN>
Any help would be greatly appreciated! TIA!
Last edited: