Og hvis du gerne vil have en ComboBox i dit ark til at vælge faner med:
Indsæt en Combo Box (ActiveX control) i dit ark
Dobbeltklik boksen
I vinduet der dukker op (VBE) indsætter du disse kode-blokke:
'(Hvis du ændrer navnet på ComboBox'en skal du ændre ComboBox1 til det navn du har ændret til.)
Private Sub ComboBox1_Change() With Me.ComboBox1 If Not .Value = "" Then Sheets(.Value).Select End If End With End Sub
Private Sub ComboBox1_DropButtonClick() Dim ws As Worksheet With Me.ComboBox1 .Clear For Each ws In Worksheets .AddItem ws.Name Next ws End With End Sub
|