Refer to picture stored in workbook

J

JakeyC

I want to be able to change the Picture property of an Image control
using VBA. The images need to be stored 'in' the workbook, not an
external folder.

In pseudo-code, I need something like:

Sub()
If x = y then

Me.Image1.Picture = ActiveSheet.Shapes("Image1").Picture

Else: Me.Image1.Picture = ActiveSheet.Shapes("Image2").Picture
End If
End Sub

It is very important that I DON'T have to specify a full filepath using
LoadPicture(), as the workbook will be used on different machines
without access to the image folders.
 

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