access to hidden sheets

KDS14589

New Member
Joined
Jan 10, 2019
Messages
29
I have A combo box named comboWs that has a list of all 63 worksheets in the workbook, but all are hidden except the active one. Combo's output is on worksheet named general.switchboard in cell "O54" (this worksheet is visible=true). I want to go to the worksheet selected in the combo. I've tried several codes and even a few from the internet. Most from the net work with listbox's, user forms, or didn't connect to hidden sheets. I've tried to unhide the sheet by code first before selecting but that didn't work either. I'm at a point were the solution may be simple but I've tried so many times and with many codes I've started eating the Halloween candy that's for the kids. ::banghead::
Help!!!!!
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,590
Office Version
365
Platform
Windows
Is you combo an ActiveX, or Forms Control combo?
 

James006

Well-known Member
Joined
Apr 4, 2009
Messages
3,680
Hello,

Have you tested

Code:
Private Sub ComboBox1_Change()
    Sheets(ComboBox1.Text).Visible = True
    Application.Goto Sheets(ComboBox1.Text).Range("A1")
End Sub
Hope this will help
 

KDS14589

New Member
Joined
Jan 10, 2019
Messages
29
STILL NO LUCK
my last try is

Private Sub gotoCombows_Click()
Sheets("general.switchboard").Range("O53").Visible = True
Application.Goto Sheets("general.switchboard").Range("A1")
End Sub

I tried your code but that didn't work either.
I've added a command button next to the combo box so I don't get a loop that freezes up my computer
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,590
Office Version
365
Platform
Windows
Assuming it's an activex combo (as you never answered my question).
Try
Code:
Private Sub [COLOR=#ff0000]comboWs[/COLOR]_Click()
    With Me.[COLOR=#ff0000]comboWs[/COLOR]
        Sheets(.Value).Visible = xlSheetVisible
        Sheets(.Value).Activate
    End With
End Sub
 

KDS14589

New Member
Joined
Jan 10, 2019
Messages
29
sorry I didn't answer.
I was distracted.
yes it is an activex.
and your code works.
thank you!!!!!
I'm sorry for the delay.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,590
Office Version
365
Platform
Windows
Glad we could help & thanks for the feedback
 

Forum statistics

Threads
1,089,434
Messages
5,408,195
Members
403,188
Latest member
Sanjana Ramesh

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top