Create new pattern in Excel programmatically

  • Thread starter Thread starter jonno
  • Start date Start date
J

jonno

In Excel 2002 I can format a shape with a pattern. I can choose from 48
patterns in the list.
If those patterns aren't suitable is there any way that I can specify an
additional pattern?
eg Can I add some patterns programmatically when Excel starts up?

Here's what I do:
1) Add an AutoShape
2) Right click the AutoShape, choose Format Autoshape...
3) Choose Color dropdown
4) Select Fill Effects...
5) Choose Patterns tab
6) See 48 patterns, none of which are quite right

At this point I'd like some more patterns to be available. I'm happy to
write some VBA to get them in the list if possible.

cheers,
Jonathan
 
You only have the options that are available on the worksheet. I usually
turn on the macro recorder and then try the operations I want on the
worksheet. Add a shape and then change the options. the macro recorder
usally will create the macro code you need.
 
Create your own pattern using your favorite graphics editor.

Save as a *.jpg

Then instead of using "Pattern" choose "Picture" or "Texture"

Select the created *.jpg


Gord Dibben MS Excel MVP
 
Ta, that sounds like the best option. The client isn't convinced though!
Many thanks.
 
Back
Top