+ Reply to Thread
Results 1 to 3 of 3

Command Button to open hidden sheet and close when de- selected

  1. #1
    Forum Contributor
    Join Date
    04-07-2020
    Location
    New Zealand
    MS-Off Ver
    365
    Posts
    219

    Command Button to open hidden sheet and close when de- selected

    Hi There

    I have a code below that I have on my index sheet. All my other sheets besides the INDEX sheet is hidden. As soon as i select the sheet name "Dashboard" on the index sheet hyperlinked to the "Dashboard" sheet it opens that sheet. When I click the index sheet again the open sheet "Dashboard" is hidden again

    I want to change the code a bit and link it to a command button. The command buttons name will be DASHBOARD as soon as I select the command button I want want it to open the DASHBOARD sheet, when I then click the unhiden index sheet the DASHBOARD sheet will hide again

    Could someone perhaps help me in the right direction

    Please Login or Register  to view this content.
    Last edited by Chris1976; 05-05-2020 at 05:17 AM.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,262

    Re: Command Button to open hidden sheet and close when de- selected

    No sample file...Mind readers can help...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Command Button to open hidden sheet and close when de- selected

    Hi Chris,

    Try the following code included in the attached sample workbook.
    Please Login or Register  to view this content.
    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). http://www.cpearson.com/excel/DeclaringVariables.aspx

    Use 'Forms' CommandButtons - DO NOT use 'AcitveX' CommandButtons. ActiveX DOES NOT play nice with others.
    To assign a Macro to a CommandButton, 'Right Click' the CommandButton.

    Lewis

+ 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. command button to Save As sheet in new workook and Close options to hide sheet
    By AmandaM73 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2018, 03:59 AM
  2. Open/Save/Close Workbook via command button
    By nathan0519 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2015, 11:24 PM
  3. Macro to Hyperlink Command Button to open Selected Folders From a List Box
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-22-2015, 11:05 PM
  4. [SOLVED] Need Help With Coding Command Button to Close Sheet Text Box
    By mandora in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-08-2014, 04:39 PM
  5. [SOLVED] copy selected row and paste it to another sheet command button vba
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-22-2014, 03:22 AM
  6. Open a hidden sheet with clicking a button
    By Fixxxer1234 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-14-2014, 11:00 PM
  7. Replies: 2
    Last Post: 02-13-2011, 01:22 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