Thursday, January 26, 2012

How to Turn on Worksheet Gridlines Row Headings Using VBA in Excel 2003


1. Launch Office Excel 2003, click the “Tools” menu, click “Macro” and click “Visual Basic Editor” window. Click the “Tools” menu and click “Project Explorer.”
2. Click “ThisWorkbook module” and copy and paste the following code to hide the gridlines and headings:Private Sub hideGridLines()
ActiveWindow.DisplayGridlines = False
ActiveWindow.DisplayHeadings = False
End Sub
3. Press “F5” to run the procedure.
4. Copy and paste the following code to your module to show the gridlines and headings:Private Sub showGridLines()
ActiveWindow.DisplayGridlines = True
ActiveWindow.DisplayHeadings = True
End Sub
5. Press “F5” to run the procedure.

Blogger news