LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default display gridlines

Morning all.
I have multiple worksheets that are displaying the gridlines. This appears
to be fairly common across numerous workbooks, so I'd like to make a macro
that will turn off the display gridlines.
I recorded a macro that turned off the grid lines for a single worksheet,
now I need to put in a for loop to iterate through all of the sheets in the
file.
I tried the following and it hangs up on the "If sh.DisplayGridlines = True
Then" statement, stating it cannot perform this task-- "object does not
support this property or method" a 438 error.
Any ideas on how to make one that does work?
Thank you.

Sub Grids()
'
' grids Macro
' turn off grid lines
'
For Each sh In ActiveWorkbook.Worksheets
If sh.DisplayGridlines = True Then
sh.DisplayGridlines = False

End If
Next
' ActiveWindow.DisplayGridlines = False

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display of gridlines Financeguy Excel Programming 2 July 20th 09 02:54 PM
display gridlines with fill color smartgal Excel Discussion (Misc queries) 1 January 24th 09 01:54 AM
gridlines won't display bobm Excel Discussion (Misc queries) 1 December 6th 08 06:15 PM
my excel worksheet will not display gridlines jomba Excel Worksheet Functions 3 July 27th 07 08:02 AM
How to display gridlines at irregular intervals? Jason Weiss Charts and Charting in Excel 2 January 3rd 05 07:30 PM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"