ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   toggle grid (https://www.excelbanter.com/excel-programming/275685-toggle-grid.html)

Todd[_5_]

toggle grid
 
Hi,

I am wondering if I can put a button on a worksheet to
utilize the toggle grid function? I am turning off the
grid lines all the time in one worksheet and I move from
one computer to another so adding to the toolbar is a
pain.

TIA

William[_2_]

toggle grid
 
Todd

Try....

Sub Gridlines()
ActiveWindow.DisplayGridlines = Not ActiveWindow.DisplayGridlines
End Sub
--
XL2002
Regards

William


"Todd" wrote in message
...
| Hi,
|
| I am wondering if I can put a button on a worksheet to
| utilize the toggle grid function? I am turning off the
| grid lines all the time in one worksheet and I move from
| one computer to another so adding to the toolbar is a
| pain.
|
| TIA



Dave Peterson[_3_]

toggle grid
 
Try Tools|customize|commands Tab|Forms category. It's near the bottom (well,
for xl2002 anyway)

(I like this button, too!)

Todd wrote:

Hi,

I am wondering if I can put a button on a worksheet to
utilize the toggle grid function? I am turning off the
grid lines all the time in one worksheet and I move from
one computer to another so adding to the toolbar is a
pain.

TIA


--

Dave Peterson


Gord Dibben[_3_]

toggle grid
 
Todd

Copy/paste William's macro your workbook then from the Forms Toolbar place a
button on the worksheet and assign the macro to that button.

The macro and the button will travel with the workbook and no need to
customize any Toolbars.

Gord Dibben Excel MVP XL2002

On Sat, 30 Aug 2003 02:48:05 +0100, "William" wrote:

Todd

Try....

Sub Gridlines()
ActiveWindow.DisplayGridlines = Not ActiveWindow.DisplayGridlines
End Sub



Todd Lan

toggle grid
 
Thanks very much. I put the button in the workbook and it is wonderful!

Thanks again.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 05:08 AM.

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