Hi all,
I have a question. I'm a bit of a noob when it comes to VBA etc but here goes:
I am looking for a way to place a hyperlink on each tabbed sheet in an excel workbook so that when someone has read the info on that tab (it's a training document that I am designing) and hits the "YES" hyperlink it populate the date and time into the index sheet in the Yes column in the correct cell. Alternatively when he clicks "NO" it should then do the same but in the corresponding cell in the No column. Each time you press the hyperlink it will update the date and time.
This will enable me to track when people have read and understood the training and I can address each person separately once I have a handle on what they know and what they don't know etc.
Anyway, I have managed to get this far; I can get the Yes hyperlink to populate the date and time in the correct cell, OR I can get the No hyperlink to populate in its correct target cell. I can't get both to populate their corresponding cells. I have used the below (after trawling around looking for a solution). Is there any way to amend it so that it can do both?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rngWatch As Range
'What cells do we care about?
Set rngWatch = Range("F:F")
'Don't care if user selects more than one cell
If Target.Cells.Count > 1 Then Exit Sub
'Is it a cell we care about?
If Intersect(Target, rngWatch) Is Nothing Then Exit Sub
'Place timestamp in cell next to our click
Target.Offset(0, 1).Value = Now
End Sub
I have tried adding in the following after the Set rngWatch = Range("F:F")
Set rngWatch = Range("H:H")
but it doesn't work. Like I said, it will just do the one OR the other. If I click the Yes hyperlink it will take me back to the index Worksheet and populate the correct cell with date etc, and when I click the No hyperlink it also takes me back to the index Worksheet but does nothing else.
Any ideas?
Bookmarks