Testing object value

M

mooresk257

I am working on setting up some code to test whether an image is loaded in an
image box:

I use this to test to see if there is no image loaded:

If Worksheets("Sheet1").OLEObjects("Image2").Object.Picture Is Nothing Then

How would I write this line to test if there IS an image?

Thanks!
 
R

Rick Rothstein

Try this...

If Not Worksheets("Sheet1").OLEObjects("Image2").Object.Picture Is Nothing
Then
 

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