does comment in a cell contain a picture.

rccharles

New Member
Joined
Jul 30, 2019
Messages
4
I'm trying to determine if a cell contains a comment with a picture. While I tried this way and it failed, any which way that works would be fine.

I found this code:
Code:
<code>Set shp = Range("C4").Comment.Shape
     if shp.Fill.TextureType = msoTextureUserDefined then

end if</code>

https://stackoverflow.com/questions/22543601/determine-image-in-excel-comment


which I think does check if a comment contains a picture.

However, I get an error message pointing to Fill.

my version of this code:

Code:
Sub testFunction()
Dim shp As Range

Debug.Print " checking for shape "

Set shp = Range("b4").Comment.Shape

If shp.Fill.TextureType = msoTextureUserDefined Then
        Debug.Print "shape found"
End If

End Sub

The picture of the error is here.

https://www.dropbox.com/s/uoa453t6dj6ji2s/Screen Shot 2019-07-31 at 10.08.28 PM.png?dl=0

Screen%20Shot%202019-07-31%20at%2010.08.28%20PM.png


my environment ecel 2011. macOS 10.10.5
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top