• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to open hyperlinks to other workbooks

DWM

New Member
Hi I have several workbooks I would like to open using a button.

The file names can change. So these are typed and hyperlinked in a range on cells on my summary workbook.


I currently have a macro running but it seems to link to the previous filename that was saved in the cell when I set the macro up.


Current VBA:

[pre]
Code:
Sub OpenFiles()
'
' OpenFiles Macro
' Opens all asscoiated files
'

'
Range("C46:L46").Select
Selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=True
ActiveWindow.ActivateNext
Range("C48:L48").Select
Selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=True
ActiveWindow.ActivateNext
Range("C50:L50").Select
Selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=True
ActiveWindow.ActivateNext
Range("C52:L52").Select
Selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=True
ActiveWindow.ActivateNext
Range("C54:L54").Select
Selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=True
ActiveWindow.ActivateNext
ActiveWindow.ActivateNext
ActiveWindow.ActivateNext
ActiveWindow.ActivateNext
ActiveWindow.ActivateNext
Range("C55").Select
End Sub
[/pre]

It also appears that from DATA/ Edit Links that it is using the old file.


Any help would be much appreciated
 
DWM


Do you still need this answered or does your other post replace this question ?

Refer: http://chandoo.org/forums/topic/macro-to-open-filename-held-in-a-cell
 
Both answered please. I posted origianlly how I had set it up with Hyperlinks.

The second post was more generic as using VBA code I probably do not need to use hyperlinks.


Thanks
 
Back
Top