error handeling

EDUCATED MONKEY

Board Regular
Joined
Jul 17, 2011
Messages
218
this is going to be so ease for you guys and so anoying for me as i am sure i have encountered this in the past and just can not think what to do heres the small problem

Image1.Picture = LoadPicture(LValue)

LValue = "H:\authorpics\" & Pic & MyString

so it goes to file graps the jpeg displays it fine, that is if it exsists, if not it errors any halts which you would expect, i have tried wrapping an if statement around it to no avail still crashes if jpeg is not in the file?
so plese help the confused like i said i sure this is simple my brain has shut down !!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Code:
If Len(Dir(LValue)) Then
   'file exists
End If
 
Upvote 0
thanks, its one of those days when i can do the times crossword in five mins but not remember pin number at the petrol station i realy can not thank you enough
 
Upvote 0

Forum statistics

Threads
1,224,557
Messages
6,179,507
Members
452,917
Latest member
MrsMSalt

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