Error when Shapes.AddPicture can find the path

%3CLINGO-SUB%20id%3D%22lingo-sub-3366415%22%20slang%3D%22en-US%22%3EError%20when%20Shapes.AddPicture%20can%20find%20the%20path%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3366415%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20i%20have%20a%20macro%20that%20check%20different%20extension%20to%20find%20the%20correct%20pic%20on%20the%20pc%20and%20i%20do%20it%20via%20error%20check%20is%20error%20then%20check%20the%20next%20extension%20like%20this%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20Error%20Resume%20Next%3C%2FP%3E%3CP%3EIf%20Err.Number%20%26lt%3B%26gt%3B%200%20Then%3CBR%20%2F%3EErr.Number%20%3D%200%3C%2FP%3E%3CP%3E....%3C%2FP%3E%3CP%3EIt%20was%20working%20fine%20until%20now%2C%20that%20maybe%20some%20update%20now%20pop%20up%20a%20message%20saying%20that%20the%20file%20is%20not%20found%20in%20the%20path.%3C%2FP%3E%3CP%3EHow%20can%20I%20disable%20the%20popup%20message%20or%20how%20can%20i%20check%20the%20path%20exist%20before%20adding%20the%20picture%20to%20resolve%20error%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3366415%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hi i have a macro that check different extension to find the correct pic on the pc and i do it via error check is error then check the next extension like this

 

On Error Resume Next

If Err.Number <> 0 Then
Err.Number = 0

....

It was working fine until now, that maybe some update now pop up a message saying that the file is not found in the path.

How can I disable the popup message or how can i check the path exist before adding the picture to resolve error

0 Replies