ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Display of gridlines (https://www.excelbanter.com/excel-programming/431336-display-gridlines.html)

Financeguy

Display of gridlines
 
Is there an easy way of turning off all gridlines in an excel workbook
document (all worksheets) before I execute my vba routine.
Request your help with the syntax.
Thanks in advance.

Abdul

Display of gridlines
 
Sub Test
For Each xwindow In Application.Windows
xwindow.Activate
For Each Sh In ActiveWorkbook.Worksheets
Sh.Activate
ActiveWindow.DisplayGridlines = False
Next Sh
Next xwindow
end sub

====
Please Click YES if this helped you
"Financeguy" wrote:

Is there an easy way of turning off all gridlines in an excel workbook
document (all worksheets) before I execute my vba routine.
Request your help with the syntax.
Thanks in advance.


ryguy7272

Display of gridlines
 
You can also do it by Tools Options uncheck Gridlines.

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Abdul" wrote:

Sub Test
For Each xwindow In Application.Windows
xwindow.Activate
For Each Sh In ActiveWorkbook.Worksheets
Sh.Activate
ActiveWindow.DisplayGridlines = False
Next Sh
Next xwindow
end sub

====
Please Click YES if this helped you
"Financeguy" wrote:

Is there an easy way of turning off all gridlines in an excel workbook
document (all worksheets) before I execute my vba routine.
Request your help with the syntax.
Thanks in advance.



All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com