marlonsaveri
Board Regular
- Joined
- Jan 28, 2011
- Messages
- 68
Hi,
When I use "On Error Resume Next", I avoid an error here:
However, i need something like this:
How could I write it?
And a second question:
Actually, a property (given by mtx_prop(i,1) could have more the one picture, so, I want something like this:
When I use "On Error Resume Next", I avoid an error here:
Code:
mypicture = ThisWorkbook.Path & Application.PathSeparator & ActiveSheet.Name & "-" & mtx_prop(i, 1) & ".jpg"
On Error Resume Next
Image1.Picture = LoadPicture(mypicture)
However, i need something like this:
Code:
If picture exists:
Image1.Picture = LoadPicture(imagem)
Else
Image1.visible = false
And a second question:
Actually, a property (given by mtx_prop(i,1) could have more the one picture, so, I want something like this:
Code:
if, to this property, there was j pictures:
mypicture(1) = ThisWorkbook.Path & Application.PathSeparator & ActiveSheet.Name & "-" & mtx_prop(i, 1) & [B]j[/B] & ".jpg"
Image1.Picture = LoadPicture(mypicture(1))
mypicture(2) = ThisWorkbook.Path & Application.PathSeparator & ActiveSheet.Name & "-" & mtx_prop(i, 1) & j & ".jpg"
[B]Image2[/B].Picture = LoadPicture(mypicture([B]2[/B]))