Displaying/Hiding Sheet tabs

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
It is not in violation of any rules but many posters will choose not to follow a link and so you are better off posting the question on full.
 
Upvote 0
Sounds good. Thank you MARK858.

So here it is. Please let me know if further clarification is needed. I appreciate any help:

****************************

Thank you rabsofty and Infomage for your feedback I do appreciate it.

I'll have to apologize because I do not believe I am communicating what I am looking for well enough. Let's see if I can do better: So rabsofty, you are in the right path, the ActiveWindow.DisplayWorkbookTabs is the command I am utilizing which of course is the VBA equivalent of the pic I posted regarding the route of File | Options...and so forth. I am aware that the latter (VBA or otherwise) does not remove the tabs but merely removes them from the user's sight. Infomage, I am actually utilizing the very hidden method and it is not what I am desiring to do.

So back to the ActiveWindow.DisplayWorkbookTabs command - I am looking to use this very command BUT, I need to execute (via VBA) **IF** the user uses the File | Options | Advanced | Display options for this workbook to manually attempt to display the tabs again. In other words, let's say I'm the user and I want to "peek" into the tabs of the workbook and I have enough knowledge to make the sheet tabs appear/show via the File | Options | Advanced | Display options for this workbook check box <-- **THIS** is what I am attempting to prevent. Once the user checks the latter box and clicks OK, I need for the workbook to "look and feel" that the tabs are now displaying, provide a "naughty user" message box, and, re-hide them again.

I've attempted to use the following workbook event but, unfortunately, the code will only fire once the sheet becomes active - which I suppose will work, but, I'd rather have the code fire BEFORE than after. I hope I've explained it better and it makes better sense:

Code:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)

   If ActiveWindow.DisplayWorkbookTabs = True Then
     ActiveWindow.DisplayWorkbookTabs = False
   End If

End Sub
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,249
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top