Web Sourced images in a UserForm

Atroxell

Active Member
Joined
Apr 18, 2007
Messages
422
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:

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:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,215,331
Messages
6,124,312
Members
449,152
Latest member
PressEscape

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top