ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable Worksheet Tab Menu (https://www.excelbanter.com/excel-programming/300071-re-disable-worksheet-tab-menu.html)

kkknie[_116_]

Disable Worksheet Tab Menu
 
Found by recording a macro...

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWindow.DisplayWorkbookTabs = True
End Sub

Private Sub Workbook_Open()
ActiveWindow.DisplayWorkbookTabs = False
End Sub



--
Message posted from http://www.ExcelForum.com


JE McGimpsey

Disable Worksheet Tab Menu
 
I'd recommend using the Workbook_Activate and Workbook_Deactivate event
macros, instead of Open and BeforeClose. That way it only applies to
that workbook, even if there are multiple workbooks open in the XL
instance.



In article ,
kkknie wrote:

Found by recording a macro...

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWindow.DisplayWorkbookTabs = True
End Sub

Private Sub Workbook_Open()
ActiveWindow.DisplayWorkbookTabs = False
End Sub


cjsmile2106

Disable Worksheet Tab Menu
 
Thank you everyone for your assistance. I'm still having troubl
disabling the menu though. The following macro works great, but I nee
to be able to view the tabs. I need to disable the tab menu, but stil
view the tabs themselves, and I haven't been able to figure that on
out yet. Help?!?

Thank you!

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWindow.DisplayWorkbookTabs = True
End Sub

Private Sub Workbook_Open()
ActiveWindow.DisplayWorkbookTabs = False
End Su

--
Message posted from http://www.ExcelForum.com


Ron de Bruin

Disable Worksheet Tab Menu
 
He I was right then <g

Did you try my example ?

--
Regards Ron de Bruin
http://www.rondebruin.nl


"cjsmile2106 " wrote in message ...
Thank you everyone for your assistance. I'm still having trouble
disabling the menu though. The following macro works great, but I need
to be able to view the tabs. I need to disable the tab menu, but still
view the tabs themselves, and I haven't been able to figure that one
out yet. Help?!?

Thank you!

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWindow.DisplayWorkbookTabs = True
End Sub

Private Sub Workbook_Open()
ActiveWindow.DisplayWorkbookTabs = False
End Sub


---
Message posted from http://www.ExcelForum.com/





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

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