+ Reply to Thread
Results 1 to 8 of 8

Disable sheet tabs in a workbook

  1. #1
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    223

    Disable sheet tabs in a workbook

    Hi,
    Is there any code by which we can disable all sheet tabs in a workbook? Sheet tab will shown but when click on it it will not go to that sheet and by only pressing button mapped in Hyperlink will enable and clicking on it it will go to that sheet. Thanks.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,214

    Re: Disable sheet tabs in a workbook

    You cannot directly disable a visible worksheet tab. However, you can use the Activate event to go to a different sheet if the user clicks the tab. The user may see the sheet flash on the screen for a fraction of a second. Then your code for the button has to disable events, activate the sheet, the re-enable events. The only other way that I can think of to do this is to hide the tab, but you said you want it to be visible.

    That is just the strategy, but your question is high-level. I can help with specific code if you attach your workbook.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    223

    Re: Disable sheet tabs in a workbook

    Hi,
    Sorry for the reply delayed. Please provide your mentioned code and hope it will work for me. I don't have any specific sheet for it. I just want this code without hide sheet tabs.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,214

    Re: Disable sheet tabs in a workbook

    Please provide a sample workbook. To write such code I would have to write it in a workbook and test it. If you provide your file then I won't have to create one from scratch, which may not match what you need. What do you have to start with? Do you have a button and code to go to a sheet? Please provide an example that is as complete as possible.

  5. #5
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    223

    Re: Disable sheet tabs in a workbook

    Hi,
    Have attached the file for your reference.
    Attached Files Attached Files

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,530

    Re: Disable sheet tabs in a workbook

    Is this what your after?
    Attached Files Attached Files
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  7. #7
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    223

    Re: Disable sheet tabs in a workbook

    Dear Bakerman Sir,
    Thank you very much for your code. This is exactly what i needed. You are the one who is constantly help me to resolve most of my queries.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,530

    Re: Disable sheet tabs in a workbook

    All credit goes to Jeff for giving the perfect pass. Only needed to score.
    Glad to help and thanks for rep+.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to Disable Right click in sheet tabs in one sheet?
    By wiliam_s in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-06-2016, 03:27 PM
  2. [SOLVED] VBA code to merge multiple sheet with multiple tabs into one workbook in different tabs
    By Jagdev in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-06-2015, 07:42 AM
  3. Disable sheet tabs right click for current file only
    By ajaykgarg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-12-2010, 03:14 AM
  4. Activate Sheet and Disable Tabs on Open
    By ramakavin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2008, 04:12 PM
  5. Disable Copy any sheet from workbook
    By jerryjaysr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2007, 11:32 PM
  6. Select sheet tabs in workbook & save to separate workbook files
    By stratocaster in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2006, 11:40 AM
  7. Disable "Sheet tabs" check box under [Tools][Options]-[View] tab
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-01-2005, 11:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1