Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Good morning

    I have a workbook which I created in Excel 2003 but I am currently on assignment in Singapore and it opens as the dreaded Excel 2007 so I do not know if the advice required would be the same

    In the WB I have 240 Tabs and want to make the same change to 237 of these, on G10 of each of the 237 sheets is a hyperlink to cell A543 on the same sheet.

    If I select the 237 tabs and then change the 1st hyperlink to A527 I think it will change the hyperlink on all of the pages to point to A527 on the first selected WS and not to A527 on each WS.

    Is there anything I can do to avoid that or do I have to go through and manually change them all?
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  2. #2
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Trawling back through time I have managed to find the following code kindly supplied by Hans

    Code:
    Sub CreateHyperlinks()
    	Dim wsh As Worksheet
    	For Each wsh In Worksheets
    		Select Case wsh.Name
    			Case "Index", "KangarooExpressImports", "KangarooExpressExport", "Currencies", "General Information"
    				' Do nothing
    			Case Else
    				wsh.Range("A10").Hyperlinks.Delete
    				wsh.Hyperlinks.Add _
    					Anchor:=wsh.Range("A10"), _
    					Address:="", _
    					SubAddress:="'" & wsh.Name & "'!A527", _
    					TextToDisplay:="Click for Export Cargo"
    		End Select
    	Next wsh
    End Sub
    It has worked for me twice now but for some reason is not a 3rd time but that is probably something I have done

    Editted: The reason it did not work the 3rd time is because some dumbo (me) put the wrong cell reference in!!
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •