Image Not Found

millzner

New Member
Joined
Nov 28, 2008
Messages
28
Working on an excel VBA application that I can enter a ID Number and will return employee info, including a Picture into excel worksheet. I can do all of this fine. What I need is any easy way to get the program to continue when there isn't an image of the employee on file.

Any thoughts??
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

millzner

New Member
Joined
Nov 28, 2008
Messages
28
Read through the Post and unless I read it wrong it looks for values using a Userform Interface and returns values from cells. I am doing almost the identical thing but here is my problem. I have 6 columns of data, Column A is the Employee Number, and Column F is the employee Image File Name. The employee number would be something like 123456 and the Image would be 123456.JPG. The problem is that there is a chance that the image 123456.JPG does not exist in the folder I have and would like to be able to continue with the program without crash and maybe insert a default image. I can do this if the Image cell was blank but can't figure out how to do it with values in all the cells.

And if this code was in your post I appoligize for missing it but I didn't see that.
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Perhaps

Code:
On Error Resume Next
'
'code to retrieve picture
'
On Error GoTo 0
 

Watch MrExcel Video

Forum statistics

Threads
1,123,530
Messages
5,602,192
Members
414,513
Latest member
junbuggle

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
Top