+ Reply to Thread
Results 1 to 2 of 2

VBA to navigate to a sheet selected from a drop down list

  1. #1
    Registered User
    Join Date
    04-07-2014
    Location
    Port Talbot, Wales
    MS-Off Ver
    Excel 2007
    Posts
    54

    VBA to navigate to a sheet selected from a drop down list

    I have a User Form with a drop down list of sheets. I want to select a sheet name from the list and navigate to that sheet
    Any and all help would be appreciated
    I've tried the code below but obviously this doesn't work

    Case "Pivot Tables"
    Application.ScreenUpdating = False

    Sheets("Tables").Visible = True
    ActiveWindow.SelectedSheets.Visible = False

    Sheets("Tables").Select
    Range("A5").Select

    'Clear all cells
    Cells.Select
    Range("D1").Activate
    Selection.ClearContents
    Range("A1").Select
    Application.ScreenUpdating = True

    regards

    Cobwebs
    Cobwebs, Alba Gu Brath (Scotland Forever)

  2. #2
    Registered User
    Join Date
    01-28-2016
    Location
    Kraków
    MS-Off Ver
    Office 2010
    Posts
    14

    Re: VBA to navigate to a sheet selected from a drop down list

    When it comes to only activating a sheet, this code might help:

    Private Sub UserForm_Activate()

    list_box.AddItem "Sheet1"
    list_box.AddItem "Sheet2"

    End Sub

    Private Sub CommandButton1_Click()
    sheet_name = list_box.Value
    Worksheets(sheet_name).Activate
    End Sub

+ 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. Drop down list that changes selected sheet
    By Mike_StGeorge in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 06-22-2017, 01:39 PM
  2. Replies: 9
    Last Post: 09-20-2015, 11:30 AM
  3. HELP : Unhide sheet only the Selected option from drop down list
    By shiven.k in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-11-2013, 12:37 AM
  4. Navigate in a drop down list
    By pal_slg in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 10-19-2011, 01:53 PM
  5. Extract data from sheet selected from drop down list
    By kanight in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2011, 07:20 AM
  6. Value selected on drop down list, look-up on different sheet
    By liseladele in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2006, 10:30 PM
  7. Can I use a drop down list to navigate to other spreadsheets
    By djp in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-07-2005, 09:20 AM

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