Ok here it is, I have this VBA code in Excel that I am trying to take certain data from one tab to another tab and edit that data. I am getting almost everything to complete except when I run it I get a dialog box that comes up and says “Select Range”. It should take the data in the selected cell and add it to the end of a given URL, with the cell Value shown, so that when clicked it will take you to the page with the given ID and URL combined.
Here is the code:
'Hyperlink column A Dim WorkRng As Range Set WorkRng = Application.Selection Dim l As Long Dim addr As String For l = WorkRng.Rows.Count To 1 Step -1 If WorkRng.Cells(l, 1).Value <> "" Then addr = CStr("https://att.agilecraft.com/RequestGrid?FirstTime=True&RequestID=") & CStr(WorkRng.Cells(l, 1).Value) WorkRng.Cells(l, 1).Hyperlinks.Add Anchor:=WorkRng.Cells(l, 1), _ Address:=addr, _ TextToDisplay:=CStr(WorkRng.Cells(i, 1).Value) End If Next l
This refuses to go to the next line till it reaches the last row.