Hi, Daniel,
This code would make buttons on the top of a sheet.
Before run this code, please be sure to add NAMES( from Insert > Names.) to
the ranges where that title
appears.
'-- CODE ----------------------------------------------
Sub MakeButtons()
Dim n As Name
Dim rng As Range
Dim i As Long
For Each n In ThisWorkbook.names
On Error Resume Next
Set rng = Range(n)
If Not Err.Number <> 0 Then
i = i + 1
With Sheets(1).Cells(i, 1)
With .Parent.Buttons.Add(.Left, .Top, .Width, .Height)
.Caption = n.Name
.OnAction = "'GotoRange" & Chr$(34) & rng.Parent.Name &
"!" & _
rng.Address & Chr$(34) & "'"
With .Characters(Start:=1, Length:=Len(n.Name)).Font
.Name = "Verdana"
.Size = 9
End With
End With
End With
End If
Next
Set rng = Nothing
End Sub
Sub GotoRange(ByVal Target)
Application.Goto Range(Target)
End Sub
'-------------------------------------------------------
--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters'
URL:
http://www.interq.or.jp/sun/puremis/colo/CellMastersLink.htm
mailto:
[email protected]
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/