من میخوام توی لیستم فقط شیت های خاصی قرار بگیرن نه همه شیت ها
چطور این کار رو انجام بدم؟
Maybe you have created a drop-down list before, but have you ever created a drop-down list with the hyperlinks to every sheet in Excel as below screenshot shown?
There is only a VBA code that can handle the job in Excel.
1. Click Developer > Insert > Combo Box (ActiveX Controls).
Note: If the developer tab is not shown in the Ribbon, please click File > Options > Customize Ribbon, and then check the Developer option in the right box. See screenshot:
2. Then draw a Combo Box anywhere you like.
3. Right click at the sheet you drew the Combo Box just now, and click View Code from the context menu.
4. Copy and paste below code to the blank script, and then save it to go back to the sheet.
VBA: Create drop down list with sheet links
Private Sub ComboBox1_Change() 'UpdatebyExtendoffice20180404 Sheets(Me.ComboBox1.Text).Select End Sub Private Sub ComboBox1_GotFocus() Dim I As Long Me.ComboBox1.Style = fmStyleDropDownList If Me.ComboBox1.ListCount <> Sheets.Count Then Me.ComboBox1.Clear For I = 1 To ActiveWorkbook.Sheets.Count Me.ComboBox1.AddItem Sheets(I).Name Next End If Me.ComboBox1.DropDown End Sub
5. Click Developer > Design Mode to exit the design mode.
Now all sheets have been listed in the drop-down list, and it will go to the sheet while you clicking at the sheet name.
If you just want to create a list of clickable sheet names as below screenshot shown, you can apply Kutools for Excel’s Create List of Sheet Names feature which can create a list of hyperlinks about sheet names or list of macro buttons about sheet names.
|Kutools for Excel, with more than 300 handy functions, makes your jobs more easier.|
After installing Kutools for Excel, please do as below:（Free Download Kutools for Excel Now!)
1. Click Kutools Plus > Worksheet > Create List of Sheet Names.
2. In the Create List of Sheet Names dialog, do as below:
(1). Check Contains a list of hyperlinks< to create a list of clickable sheet names, or check Contains buttons and macros to create buttons which link to each sheet.
(2). Give the new sheet which you will place the hyperlinks in a name.
(3). Specify the location of the new sheet.
(4). Specify the sheet links displayed as how many columns.
3. click Ok, now the clickable sheet names have been displayed in new sheet.