ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

(¨D±Ð)¸ô¹L°ª¤â½Ð¨ó§U¤@¤U¡A¸Ô²Ó¤J¤ºVBA°ÝÃD?·P¿E~

§Ú¬O¸ô¹Lªº¡A¸Õ¸Õ¬Ý¥i¤£¥i¥H¥Î¡I
Sub ¦C¥XÀÉ®×¥[¤J¶W³sµ²()
'³]©w¤Þ¥Î¶µ¥ØMicrosoft Shell Controls And Automation  (¥²­n)
Dim mySh  As Shell32.Shell
Dim myFolder As Shell32.Folder
Set mySh = CreateObject("shell.application")
Set myFolder = mySh.BrowseForFolder(0, "½Ð«ü©w¸ê®Æ§¨", 0)
Columns("A").Clear
Columns("B").Clear
G = myFolder.Items.Item.Path
path1 = G & "\" & "*.*"
file1 = Dir(path1): r = 1
Do While file1 <> ""
    Sheets("¤u§@ªí1").Cells(r, 1) = file1
    ActiveSheet.Hyperlinks.Add Anchor:=Cells(r, 2), Address:=G & "\" & file1, _
        TextToDisplay:=G & "\" & file1
    r = r + 1
    file1 = Dir '¨ú±o¤U¤@­ÓÀɦW
Loop
End Sub
ªì¾ÇVBA¥E¨ìtwbts

TOP

«ùÄò¸ô¹L¡G¸Õ¸Õ¬Ý³o¼Ë¤l¥i¤£¥i¥H¡K¡K
Sub ¦C¥XÀÉ®×¥[¤J¶W³sµ²()
G = InputBox("¿é¤J¸ôÍß")
Columns("A").Clear
Columns("B").Clear
path1 = G & "\" & "*.*"
file1 = Dir(path1): r = 1
Do While file1 <> ""
    Sheets("¤u§@ªí1").Cells(r, 1) = file1
    ActiveSheet.Hyperlinks.Add Anchor:=Cells(r, 2), Address:=G & "\" & file1, _
        TextToDisplay:=G & "\" & file1
    r = r + 1
    file1 = Dir '¨ú±o¤U¤@­ÓÀɦW
Loop
End Sub
ªì¾ÇVBA¥E¨ìtwbts

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD