childrenfirst
Technical User
Hi,
I have a module in Excel, which will update the hyperlinks in column AD when a user downloads the spreadsheet and open it from his computer. The problem is that I want the macro to update the AD columns in all worksheets in the workbook, not just the activesheet. How should I modify the code?
Many thanks,
childrenfirst
-----------------------------------------
The current code:
Private Sub Workbook_Open()
RowCount = Cells(Cells.Rows.Count, "AD").End(xlUp).Row
For i = 2 To RowCount
Range("AD" & i).Select
original = ActiveCell.Value
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=ActiveCell.Value
Next
End Sub
I have a module in Excel, which will update the hyperlinks in column AD when a user downloads the spreadsheet and open it from his computer. The problem is that I want the macro to update the AD columns in all worksheets in the workbook, not just the activesheet. How should I modify the code?
Many thanks,
childrenfirst
-----------------------------------------
The current code:
Private Sub Workbook_Open()
RowCount = Cells(Cells.Rows.Count, "AD").End(xlUp).Row
For i = 2 To RowCount
Range("AD" & i).Select
original = ActiveCell.Value
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=ActiveCell.Value
Next
End Sub