access to hidden sheets

KDS14589

Board Regular
Joined
Jan 10, 2019
Messages
203
Office Version
  1. 2016
Platform
  1. Windows
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!!!!!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Is you combo an ActiveX, or Forms Control combo?
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,128
Members
453,021
Latest member
Justyna P

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