Microsoft
Software
Hardware
Network
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_2241618
2.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
Please Advise, very urgent issue, Event ID: 8197, Event Source: MSExchangeFBPublish
Pattern matching in shell script
Use of Sp_who to analyse problems
Database security issue, can't access source database
Simple SQL Query Date Command
wfica32.exe crashes when opening published Citrix applications
Application.FileSearch in Office 2007
after removing rogue anti-spyware av2009 Internet Explorer will not connect
Remove Sleep/Hibernate options from start menu?
Install SSL on CAS for Exchange 2007