Can I create a new pattern in Excel programmatically?

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
 
J

Jim Cone

You have an answer at your earlier post.
--
Jim Cone
Portland, Oregon USA




"jonno"
<[email protected]>
wrote in message
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
 
J

Jonathan McComb

Yep, thanks - intarweb got me (that and a small brain).

Sorry for the postspam and thanks for your answers
 
J

Jim Cone

This one line of code loads a "brick wall" image into an autoshape oval...

ActiveSheet.Shapes("Oval 2").Fill.UserPicture "C:\Program Files\Microsoft Office 2002\media\office10\autoshap\BD18208_.wmf"

The file path will have to be adjusted for each computer it is on,
unless more code is written to search the file system to find the
particular picture file or you load the picture
file with the workbook with each installation.
--
Jim Cone
Portland, Oregon USA




"Jonathan McComb" <[email protected]>
wrote in message
Yep, thanks - intarweb got me (that and a small brain).
Sorry for the postspam and thanks for your answers

"Jim Cone"
 

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