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

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

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

§Ú¬O­èµù¥Uªº·s¤â¡A§Æ±æ¦U¸ô°ª¤â¨ó§U¤@¤U¡A«D±`·PÁ¡C
°ÝÃD¡G¦b¤½¥qºô¸ô¸ê®Æ§¨¤¤¡A¸Ì­±¦³³\¦hÀɮסA·QÂÇ¥ÑVBAª½±µÅª¨ú©Ò«ü©wªº¸ê®Æ§¨¤ºªº©Ò¦³ÀɮסA¨Ã±N¨äµ²ªGª½±µ¾É¤J¨ìEXCEL¤u§@ªí¤¤¡AEXCEL¤¤§Ú¶È»Ý­n¦U­ÓÀɮצW¥H¤Î¸ô®|³sµ²(¤è«KÂI¿ï¶}±Ò)§Y¥i¡C

P.s ¦Û¤vºâ¬OVBA·s¤â¡AÁÙ±æ¦U¦ì°ª¤â¨ó§U¤@¤U¡A°J¤ß·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

play9091±z«È®ð¤F¡A¯uªºÁÂÁ±zªº¨ó§U¡A½T¹ê¥i¥Î¡A¦ýê©ó¸ê®Æ§¨¦b¤½¥q°Ïºô¤W­±¡A©Ò¥H¸ê®Æ§¨¸ô®|ªº¤è¦¡¥i¥Î¿é¤J¦Ó«D¥Î¿ï¨úªº¤è¦¡¶Ü?·P®¦~

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

¦^´_ 3# walisalen
  1. Sub Ex()
  2.     Dim MyFolder As String, r As Integer, Myfile As String
  3.     With Application.FileDialog(msoFileDialogFolderPicker)
  4.         .InitialFileName = "D:\"                '«ü©w¶}±Ò®Éªº¥Ø¿ý
  5.         .AllowMultiSelect = False               '³æ¿ï
  6.         .Show
  7.         If .SelectedItems.Count > 0 Then        '¦³¿ï¨ú
  8.             MyFolder = .SelectedItems(1) & "\"  '¥Ø¿ý¸ê®Æ§¨
  9.         Else
  10.             Exit Sub
  11.         End If
  12.     End With
  13.     Columns("A:B").Clear
  14.     Myfile = Dir(MyFolder & "*.xls")                 '¶Ç¦^ XLS ÀÉ®×
  15.     r = 1
  16.     Do While Myfile <> ""
  17.         Sheets("sheet1").Cells(r, 1) = MyFolder & Myfile
  18.         ActiveSheet.Hyperlinks.Add Anchor:=Cells(r, 2), Address:=MyFolder & Myfile, TextToDisplay:=Myfile
  19.         r = r + 1
  20.         Myfile = Dir                                   '¨ú±o¤U¤@­ÓÀɦW
  21.     Loop
  22. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# play9091

1¡B
¿é¤J¥H¤U¸ô®|¡G
\\tpfile01\Product Info\Data Sheet\ÁcÅ餤¤å\Data_series
µ²ªG¡G°}¦C¯Á¤Þ¶W¥X½d³ò

·PÁÂplay9091¤j¤j~

TOP

¥»©«³Ì«á¥Ñ walisalen ©ó 2011-8-24 17:49 ½s¿è

TO GBKEEªO¥D¤j¤j,

²×©ó¦¨¥\¤F¡A¤p§Ì¨ü±Ð~

TO play9091¤j¤j,

·PÁ±zªº¤j¤O¨ó§U~

Á`¤§¡A¦V¨â¦ìªí¹F§Ú°J¤ß·PÁ¤§·N~¥Ì®¦°Õ~:lol

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD