Excel VBA: Jump to hidden worksheets?

Hello Community,

I have a small VBA problem in Excel.

The situation: I have a workbook with several worksheets. These sheets are displayed in a dropdown menu. Using a command button, I then jump to the worksheet previously selected in the dropdown menu:

Here is the code of the command button:

 Private Sub CommandButton1_Click()    ThisWorkbook.Sheets(Range("D7").Value).Select End Sub

However, this code only works as long as I also display the sheets at the bottom of the folder.

Now to my question: What should the code look like if I hide the worksheets?

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
1 Answer
Oldest
Newest Most Voted
Inline Feedbacks
View all comments