Question : Excel - Lock header and Anchor tag link to drop down list

Hi experts,

I have an Excel sheet.
Can you please explain how can I do the following:
1. Need to lock to top part of the sheet where my logo is
2. I need a drop down list (combobox) with a list of all the headings on the page.
   When the user select an item in the drop down the sheet must jump to the selected heading, autoscroll.
   Basically like an anchor tag in HTML for those who have HTML knowledge.

Please explain step by step as I am not very good in Excel or VB script.


Thanks in advance!

Answer : Excel - Lock header and Anchor tag link to drop down list

Marius0188:

I created an example of how this might work and saved it to my web site.

http://www.xlvbawiz.com/ee/Q_22416182.xls

- Freeze the Panes
- I like to create another tab for my drop-down boxes and call it Control
- This tab can be hidden
- Enter your headings
- Highlight them and name the range (I named mine JumpTo
- Select the cell where you want to put the drop-down and select the menu Data>Validation
- Select Allow: List
- Set the Source:  =JumpTo  or the name of your range of headings
- Right-click on the Sheet tab and select View Code
- Copy the following code and paste it into the blank module to the right

Private Sub Worksheet_Change(ByVal Target As Range)
    With Me
        If Intersect(Target, .[B2]) Is Nothing Then Exit Sub
        Dim oFind As Object
        Set oFind = .[A:A].Find(What:=.[B2], LookAt:=xlWhole)
        If Not oFind Is Nothing Then oFind.Select
    End With
    Set oFind = Nothing
End Sub

- Be sure to change the .[B2] to the cell where you have your Drop-down validation

That should get you started.  Please let me know if you have any questions.

Kindest Regards,

Jaes
Random Solutions  
 
programming4us programming4us