Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2004

Tip: Looking for answers? Try searching our database.

Add pattern using macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sparky3883 - 13 Apr 2004 18:49 GMT
Hi All

I was just wondering, is it possible to record a macro that can add
pattern to a cell?

Everytime i need to add a pattern to a cell, i have to go throug
Format|Cells|Patterns and then choose 'Thin Diagonal Stripe'.

It would be alot easier for me if i could record a macro that will d
it for me.

Is this possible?

Thanks in advanc

--
Message posted from http://www.ExcelForum.com
Chip Pearson - 13 Apr 2004 19:06 GMT
Have you tried recording a macro to do this?  Here's the code
you'll get:

> Hi All
>
> I was just wondering, is it possible to record a macro that can
add a
> pattern to a cell?
>
> Everytime i need to add a pattern to a cell, i have to go
through
> Format|Cells|Patterns and then choose 'Thin Diagonal Stripe'.
>
> It would be alot easier for me if i could record a macro that
will do
> it for me.
>
[quoted text clipped - 4 lines]
> ---
> Message posted from http://www.ExcelForum.com/
Chip Pearson - 13 Apr 2004 19:07 GMT
Have you tried recording a macro to do this? Here's the code
you'll get:

   With Selection.Interior
       .ColorIndex = 0
       .Pattern = xlLightUp
       .PatternColorIndex = xlAutomatic
   End With

Signature

Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

> Hi All
>
> I was just wondering, is it possible to record a macro that can
add a
> pattern to a cell?
>
> Everytime i need to add a pattern to a cell, i have to go
through
> Format|Cells|Patterns and then choose 'Thin Diagonal Stripe'.
>
> It would be alot easier for me if i could record a macro that
will do
> it for me.
>
[quoted text clipped - 4 lines]
> ---
> Message posted from http://www.ExcelForum.com/
Debra Dalgleish - 13 Apr 2004 22:16 GMT
A non-macro option is to add the Pattern button to one of your existing
toolbars, then float it over the worksheet:

Choose Tools>Customize
Select the Commands tab
Select the Format category
Scroll down the list of commands, to find Patterns
Drag the Patterns button to one of your existing toolbars
Close the Customize dialog box.

Click the dropdown arrow at the right of the Pattern button
Point to the ridged bar at the top of the Pattern palette.
Drag the Pattern palette away from its toolbar, and it will float over
the worksheet.
As you work, you can select a cell, and click a pattern to fill the cell

> Hi All
>
[quoted text clipped - 13 lines]
> ---
> Message posted from http://www.ExcelForum.com/

Signature

Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.