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

[µo°Ý] [¤w¸Ñ¨M]Ãö©ó ¦p¦ó¿ï¾Ü¦h­ÓÀɮ׫á¨Ì§Ç°õ¦æ¥¨¶°

[µo°Ý] [¤w¸Ñ¨M]Ãö©ó ¦p¦ó¿ï¾Ü¦h­ÓÀɮ׫á¨Ì§Ç°õ¦æ¥¨¶°

¥»©«³Ì«á¥Ñ starry1314 ©ó 2015-6-25 15:01 ½s¿è

·Q½Ð°Ý¦p¦óÅý¿ï¨ú¨ìªºÀɮר̧ǰõ¦æ§¹§Ú­nªº¥¨¶°¦bÃö³¬Àɮ׫á Ä~Äò°õ¦æ¤U¤@­ÓÀÉ®×­«½Æ¨ìµLÀɮ׬°¤î©O?

¸Ñ¨M¤è®×
  1. Sub ¶}±Ò¦h­ÓÀÉ®×()

  2.    Dim filenames As Variant

  3.    ' set the array to a variable and the True is for multi-select
  4.    filenames = Application.GetOpenFilename(, , , , True)

  5.       counter = 1

  6.       ' ¿ï¾ÜÁ`¦@­n¶}±ÒªºÀÉ®×
  7.       While counter <= UBound(filenames)

  8.          '¥´¶}¿ï©wªº¤å¥ó,¥B¤£§ó·s³sµ²
  9.          Workbooks.Open filenames(counter), UpdateLinks:=0
  10.          
  11.          '¥¨¶°
  12.          
  13.          'Ãö³¬¿ï¾ÜªºÀÉ®×
  14.          ActiveWorkbook.Close True
  15.          
  16.          
  17.          ' ®ø®§®Ø Åã¥Ü¤å¥ó¦W
  18.          'MsgBox filenames(counter)

  19.          '¶}±Ò·sÀÉ®×
  20.          counter = counter + 1

  21.       Wend
  22.    End Sub
½Æ»s¥N½X
¶}±Ò©Ò¦³¿ï¾ÜªºÀÉ®×
  1.    Sub ¶}±Ò¦h­ÓÀÉ®×()

  2.    Dim filenames As Variant

  3.    ' set the array to a variable and the True is for multi-select
  4.    filenames = Application.GetOpenFilename(, , , , True)

  5.       counter = 1

  6.       ' ¿ï¾ÜÁ`¦@­n¶}±ÒªºÀÉ®×
  7.       While counter <= UBound(filenames)

  8.          '¥´¶}¿ï©wªº¤å¥ó
  9.          Workbooks.Open filenames(counter)

  10.          ' ®ø®§®Ø Åã¥Ü¤å¥ó¦W
  11.          'MsgBox filenames(counter)

  12.          '¶}±Ò·sÀÉ®×
  13.          counter = counter + 1

  14.       Wend
  15.    End Sub
½Æ»s¥N½X
¦¹µ{¦¡¬°Åª¨úÀɮ׸ô®|,¨Ã¦bH1¨Ì§Ç©¹¤U¶K¤W¸ô®|
  1. Sub ¶}±ÒÀÉ®×_Click()
  2.     With Application.FileDialog(msoFileDialogOpen)
  3.         .InitialFileName = "\\boss-pc\¤½¥ÎºÏ°Ï"
  4.         .AllowMultiSelect = True
  5.         .Show
  6.         For i = 1 To .SelectedItems.Count
  7.             Cells(i, 7) = .SelectedItems(i) 'i=¦C 7=Äæ
  8.             'MsgBox .SelectedItems(i) 'Ū¨ú¨ìªº¸ê°T
  9.         Next
  10.     End With
  11. End Sub
½Æ»s¥N½X

        ÀR«ä¦Û¦b : ¥ÌÄ@°µ¡BÅw³ß¨ü¡C
ªð¦^¦Cªí ¤W¤@¥DÃD