Hi golferboy,Good day, my question is as follows,
I have =now() date in column A4. In column B4, I want a hyperlink to take me to today's date in Cell BS4. I want this hyperlink to move every date one cell to the right.
Thanks
Bernard
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Call FindDate
End Sub
Sub FindDate()
' Defines variables
Dim sRange As Range, Rng As Range, FindString As Date
' Sets search range as the used range of the active sheet
Set sRange = ActiveSheet.UsedRange
' Sets FindString as Today's date
FindString = Date
' With the search range
With sRange
' Set Rng as the cell where the value is found
Set Rng = .Find(What:=FindString, _
After:=.Cells(1), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False)
' If Rng exists then
If Not Rng Is Nothing Then
' Select the cell
Rng.Select
End If
End With
End Sub
Hmm, curious....Hi Fishboy, I tried your method but it doesn't want to work for me. If my mouse goes over B5, I can see the hyperlink but when I click on it, nothing happens. Doesn't want to move to today's date. Hyperlink in B5 is =Hyperlink(B5,"Test"). I have copied your code into the cell and no go!! Any other suggestions? Thanks