Shapes Fill

M

mhisma

Dear All,
is there any way to check the fill type of a shapes using VBA? I have a
worksheet contain some shapes with different fills type ( e.g. Solid or
Patterned ), and each shape represent different object ( e.g. patterned =
car, solid = motorcycle), so I want to list all shapes with its fill type (
e.g. shape1 = textbox = fill solid)

Any help will be greatly appreciated

Regards
 
P

Peter T

Sub test()
Dim shp As Shape
Dim fType As MsoFillType

Set shp = ActiveSheet.Shapes(1) ' < change

fType = shp.Fill.Type

End Sub


type "fType =" and look at the intellisense for possible values

Regards,
Peter T
 
M

mhisma

Thanks Peter,
thats works very well..:)

Peter T said:
Sub test()
Dim shp As Shape
Dim fType As MsoFillType

Set shp = ActiveSheet.Shapes(1) ' < change

fType = shp.Fill.Type

End Sub


type "fType =" and look at the intellisense for possible values

Regards,
Peter T
 

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