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

¥HÀx¦s®æ¤º®e¨M©w¡A¶}±Ò­þ­Ó¥~³¡ÀÉ®×

¥HÀx¦s®æ¤º®e¨M©w¡A¶}±Ò­þ­Ó¥~³¡ÀÉ®×

½Ð°Ý
¦ba1Àx¦s®æ¥´¤J1¡A«h¶}±Ò1.txtªº¤å¦rÀÉ¡A
¦ba2Àx¦s®æ¥´¤J2¡A«h¶}±Ò2.txtªº¤å¦rÀÉ¡A
ªº¥¨¶°¦p¦ó¼g¡A½Ð¤£§[«ü±Ð¡AÁÂÁ¡I

¦^´_ 1# 2ka
test.JPG
  1. Private Sub CommandButton1_Click()
  2. Dim n As Integer
  3. Dim Load, Name As String
  4. Dim myArr()
  5. n = Cells(1, 1).End(xlDown).Row - 2
  6. ReDim myArr(n - 1)
  7. Load = Cells(1, 2)
  8. Name = Cells(2, 2)
  9. Set fs = CreateObject("Scripting.FileSystemObject")
  10. For i = 0 To n - 1 'Àɮ׬O§_¦s¦b
  11.     myArr(i) = Load & "\" & Cells(i + 3, 1) & Name
  12.     If fs.FileExists(myArr(i)) Then
  13.         Check = 1
  14.     Else
  15.         ii = ii + 1
  16.         Check = 0
  17.         MsgBox "Àɮ׸ô®|orÀɮצWºÙ¿ù»~" & vbCrLf & "(" & ii & ") " & myArr(i) & " ¤£¦s¦b"  'Àɮפ£¦s¦b"
  18.     End If
  19. Next

  20. If Check = 1 Then
  21.     For i = 0 To n - 1
  22.     Workbooks.Open Filename:=myArr(i)
  23.     Next
  24. Else
  25. End If

  26. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : §g¤l¦p¤ô¡AÀH¤è´N¶ê¡AµL³B¤£¦Û¦b¡C
ªð¦^¦Cªí ¤W¤@¥DÃD