Anybody here can help me to set the range of this program ? This Program is to link the folder name. if you run will start the Sub Folder in A2.
I want the range start in A5 what do i need to edit ? and if i use a table in cell they will put inside the table in B5. This code when i run they put the link into the last cell of the table. Here's my file and Code. I Wish you can help me. Thanks. GOdbless...
Credit to sir. AlphaFrog to this program.
Sub Hyperlink_Subfolders()
Dim fldr As Object, sPath As String
sPath = "C:\Users\User1\Desktop\Commercial PDF_Files\P.O\STANDARD\"
Application.ScreenUpdating = False
For Each fldr In CreateObject("Scripting.FileSystemObject").GetFolder(sPath).SubFolders
ActiveSheet.Hyperlinks.Add Anchor:=Range("A" & Rows.Count).End(xlUp).Offset(1), _
Address:=fldr.Path, TextToDisplay:=fldr.Name
Next
Application.ScreenUpdating = True
End Sub
Bookmarks