![]() |
Tools/Options/ Row & column headers
Can someone tell me how to switch Row and Coumn headers on and off in VBA?
|
Tools/Options/ Row & column headers
Sub ToggleRowHeaders()
ActiveWindow.DisplayHeadings = Not ActiveWindow.DisplayHeadings End Sub -- Regards, Auk Ales * Please reply to this newsgroup only * * I will not react on unsolicited e-mails * "Hotbird" wrote in message ... Can someone tell me how to switch Row and Coumn headers on and off in VBA? |
Tools/Options/ Row & column headers
Start the macro recorder. turn the headers off. stop
recording. start recording. turn them on & stop recording. Now examine the resulting code. Sub TurnHeaders_OFF() ActiveWindow.DisplayHeadings = False End Sub Sub TurnHeaders_ON() ActiveWindow.DisplayHeadings = True End Sub Patrick Molloy Microsoft Excel MVP -----Original Message----- Can someone tell me how to switch Row and Coumn headers on and off in VBA? . |
Tools/Options/ Row & column headers
This turns off the display of row and column headings in the active
window: ActiveWindow.DisplayHeadings = False This turns the row and column headings back on: ActiveWindow.DisplayHeadings = True Hope this was what you were looking for. JerryG :) --- Message posted from http://www.ExcelForum.com/ |
Tools/Options/ Row & column headers
Yes, it was exactly what I was looking for, Jerry, many thanks.
TY also to the other poster who suggested that the Macro recorder was an easy way to find the correct code. I had spent quite long enough on a fruitless search through F1 Help, and must admit I forgot the obvious!!! "JerryG" wrote in message ... ActiveWindow.DisplayHeadings = False ActiveWindow.DisplayHeadings = True Hope this was what you were looking for. JerryG :) |
All times are GMT +1. The time now is 08:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com