grid lines

  • Thread starter Thread starter ranswrt
  • Start date Start date
R

ranswrt

How do I set the color of the grid lines on a worksheet to a specific color?
Thanks
 
toolbar - Tools, Options, select View tab, make sure Gridlines is
checked, select the color you want.

if you meant via macro, i don't know.

hth
susan
 
i looked in the object browser in visual basic & found that you can do
it via macro..........

Property GridlineColorIndex As XlColorIndex
Member of Excel.Window

but i don't know exactly how to word it in the macro. just thought
i'd throw this in for more help.
susan
 
Hi Susan,
You were almost there, all you had to do was record a macro :-)

With ActiveWindow
.DisplayGridlines = True
.GridlineColorIndex = 55
End With

It's worth noting this is one of the few things that requires the sheet to
be active and in code might require both the workbook and the worksheet to
be programmatically activated.

Regards,
Peter T

i looked in the object browser in visual basic & found that you can do
it via macro..........

Property GridlineColorIndex As XlColorIndex
Member of Excel.Window

but i don't know exactly how to word it in the macro. just thought
i'd throw this in for more help.
susan
 
that's me, always trying to do things the hard way! i didn't even
think of recording a macro, i was so busy trying to write the
code..... thanks!
(still don't even know what the OP wanted, macro or not.)
susan
 

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

Back
Top