Hi Folks
I am trying to hyperlink values in B column to the matching worksheets
(Names) using the following routines which is not working, the
RsRepSummary record set writes values to B column starting from B2 and
there are already matching worksheet names in the same workbook, how
can I refer to values in cells of B column - thanks much for your
help.
Set RsRepSummary = db.OpenRecordset("SELECT * FROM
tblSummary ORDER BY tblSummary.Regid DESC", dbOpenDynaset, dbReadOnly)
Set WS = Worksheets.Add
WS.Select
WS.Name = "Summary"
WS.Tab.ColorIndex = 15
WS.Activate
fCount = summRows + 1
summRows =
WS.Range("A2").CopyFromRecordset(RsRepSummary)
For j = fCount To fCount + summRows - 1
Range("B" & j).Select
WS.Hyperlinks.Add Anchor:=Selection,
Address:="", SubAddress:= _
"'" & B & j & "'!A1", TextToDisplay:=B & j
Next