ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Shapes Fill (https://www.excelbanter.com/excel-programming/417612-shapes-fill.html)

mhisma

Shapes Fill
 
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

Peter T

Shapes Fill
 
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



"mhisma" wrote in message
...
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




mhisma

Shapes Fill
 
Thanks Peter,
thats works very well..:-)

"Peter T" wrote:

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



"mhisma" wrote in message
...
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






All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com