Creating Macro to insert a hyperlink and then sort ...

M

Mikey C

Hi all

I have created the macro below which copies a template worksheet,
pastes it into the current workbook and then creates a hyperlink in a
specified cell.

Sub Macro3()
'
' Macro3 Macro
' Macro recorded 04/04/2007 by michaelc
'
' Keyboard Shortcut: Ctrl+z
'
Sheets("Template").Select
Sheets("Template").Copy After:=Sheets(47)
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Index").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:= _
"'Template (2)'!A1", TextToDisplay:="'Template (2)'!A1"
End Sub

However, what I would really like it to do is insert a new hyperlink
for each sheet when the macro is used again, in the cell below the
previous hyperlink. Also, I'm sure this must be possible - I would
then like to sort the hyperlinks in alphabetical order once the new
sheet / hyperlink has been created. The reason this is not straight
forward is that the existing hyperlinks are evenly distributed across
3 columns instead of one (this main sheet just acts as an index
sheet). If I try to sort the columns by highlighting all three columns
in the usual way it will just sort each column alphabetically - does
that make sense?!?!

Thanks for any help - very much appreciated!

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top