UserForm Image Control error

D

DMc2007

Hi

I am currently having problems with the image control in VBA forms when
trying to programmatically call a image at runtime.

Does naybody have any idea why this occurs.

Run-time error '-2147467259 (80004005)':

Automation error
Unspecified error

If DoesFileExist(strBidPhotos & Me.cboName.Text & ".jpg") = True Then
Me.imgPhoto.Picture = Nothing
Me.imgPhoto.PictureSizeMode = fmPictureSizeModeStretch
Me.imgPhoto.Picture = LoadPicture(strBidWizardPhotos &
Me.cboName.Text & ".jpg") 'Error Line
Else
End If

Regards

D
 
A

Andy Pope

Hi,

Should the image filename be the same as the one being check for existence?
If so,

If DoesFileExist(strBidWizardPhotos & Me.cboName.Text & ".jpg") = True Then

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top