Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-01-2023, 02:32 AM
p45cal's Avatar
p45cal p45cal is offline Error when hyperlinking Excel cells to worksheets based on the cell values for sheets whose name  in Windows 10 Error when hyperlinking Excel cells to worksheets based on the cell values for sheets whose name  in Office 2021
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Change to:
Code:
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="'" & Selection.Value & "'!A1"
but you could try this instead:
Code:
Sub FShyeperlink()
Dim cll As Range
'On Error Resume Next' only use this if you need it.
For Each cll In Selection.Cells
  cll.Hyperlinks.Delete
  cll.Parent.Hyperlinks.Add Anchor:=cll, Address:="", SubAddress:="'" & cll.Value & "'!A1"
Next cll
End Sub
Reply With Quote
 

Tags
hyperlink



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging 2 different cells containing IF formula & change in cell values based on multiple time frame jay_excel Excel 0 07-29-2017 11:04 PM
Error when hyperlinking Excel cells to worksheets based on the cell values for sheets whose name  in copy cells from a worksheet into other worksheets based on Criteria Elton Wolter Excel Programming 4 04-16-2016 08:44 AM
Error when hyperlinking Excel cells to worksheets based on the cell values for sheets whose name  in Column B Cell 25 of all worksheets copies data found in the lower cells ... rpcalo Excel 3 03-10-2016 03:38 AM
Error when hyperlinking Excel cells to worksheets based on the cell values for sheets whose name  in Reference another workbook and return values from the same cell across multiple sheets/tabs lwls Excel Programming 5 11-08-2014 02:11 PM
Change values in cells based on criteria SaneMan Excel Programming 2 02-02-2012 07:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft