«æ!«æ!·Q½Ð°Ý¼g¥X¿ï¾Ü©Ê¶×¤J¸ê®Æªº¤èªk(¤w¦³¤@¬qµ{¦¡½X,¦ý¤£ª¾¹D¦p¦ó§ï¼g))
- ©«¤l
- 27
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 38
- ÂI¦W
- 0
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- window7
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2019-12-12
- ³Ì«áµn¿ý
- 2021-4-21
|
«æ!«æ!·Q½Ð°Ý¼g¥X¿ï¾Ü©Ê¶×¤J¸ê®Æªº¤èªk(¤w¦³¤@¬qµ{¦¡½X,¦ý¤£ª¾¹D¦p¦ó§ï¼g))
½Ð°Ý¦U¦ì¤j¤j
¥H¤U¨â¬qµ{¦¡½X¬O
1.¶}±Ò¸ê®Æ§¨Åª¨ú©ÒnªºÀɮ׸ô®|³sµ²
2.§â¶}±Òªº³sµ²ÀÉ®×¥´¶} ¨Ã±NÀɮפºªºsheet¸ê®Æ¶×¤J
°ÝÃD¬O·í·Qn¶×¤Jªº¸ê®Æ¦³«Ü¦hsheet,·Q«ü©w¶×¤J¬YÓsheetªº¬Y¤@Äæ¦ì©Î¬Y¤@¦C¸ê®Æ®É,n«ç»ò§ï¼g
ÁÂÁ¦U¦ì«ü±Ðªü- Sub DATA_INPUT()
- fds = Application.GetOpenFilename("Excel Files (*.xlsm;*.xlsx), *.xlsm;*.xlsx", , , , True)
-
- If IsArray(fds) Then
- For i = 1 To UBound(fds)
- [A2].Offset(i - 1) = fds(i)
- Next
- End If
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- On Error Resume Next '''''' ¿ù»~¸õ¹L
- For Each a In Range([A2], Cells(Rows.Count, 1).End(xlUp))
- With Workbooks.Open(a)
- .Sheets.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
- .Close 0
- End With
- Next
- On Error GoTo 0 '''''''''''''¿ù»~¸õ¹L'''''''''''
- End Sub
½Æ»s¥N½X |
|
Ian
|
|
|
|
|
- ©«¤l
- 27
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 38
- ÂI¦W
- 0
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- window7
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2019-12-12
- ³Ì«áµn¿ý
- 2021-4-21
|
¦^´_ 9# GBKEE
ÁÂÁÂ!¤j¤jªºÀ°§U!
·P¿E¤£ºÉ! |
|
Ian
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 8# iverson105 - Option Explicit
- Sub Ex()
- Dim fds, i As Integer, Rng As Range, x_Sh As Worksheet, Sh As Worksheet
- fds = Application.GetOpenFilename("Excel Files (*.xlsm;*.xlsx), *.xlsm;*.xlsx", , , , True)
- If IsArray(fds) Then
- Set x_Sh = ThisWorkbook.Sheets("¤u§@ªí2") '§A«ü©w½Æ»s¸ê®Æ¨ìªº¤u§@ªí
- Set Rng = x_Sh.Cells(Rows.Count, "a").End(xlUp) '
- If Rng <> "" Then Set Rng = Rng.Offset(1)
- For i = 1 To UBound(fds)
- With Workbooks.Open(fds(i)) '¶}±Ò«ü©wªºÀÉ®×
- For Each Sh In .Sheets
- If InStr(UCase(Sh.Name), "SHEETC") Then '§A©Ò«ü©wªº¤u§@ªí¦WºÙ"SHEETC"
- Sh.[A39:D99].Copy Rng '**A39:D99 §An½Æ»sªº½d³ò
- Set Rng = x_Sh.Cells(Rows.Count, "a").End(xlUp).Offset(1)
- End If
- Next
- .Close 0
- End With
- Next
- End If
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 27
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 38
- ÂI¦W
- 0
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- window7
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2019-12-12
- ³Ì«áµn¿ý
- 2021-4-21
|
|
Ian
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 6# iverson105
¹ï§Aªº»¡©ú¨S¦³«Ü©ú¥Õ
¸Õ¸Õ¬Ý¤U±µ{¦¡½X¹ï¶Ü!- Option Explicit
- Sub Ex()
- Dim fds, i As Integer, Rng As Range, XSh As Worksheet, Sh As Worksheet
- fds = Application.GetOpenFilename("Excel Files (*.xlsm;*.xlsx), *.xlsm;*.xlsx", , , , True)
- If IsArray(fds) Then
- Set Rng = Sheets("¤u§@ªí2").Cells(Rows.Count, "a").End(xlUp) ' ªºsheet(ie:"¤u§@ªí2")ªºA1¶}©l
- If Rng <> "" Then Set Rng = Rng.Offset(1)
- For i = 1 To UBound(fds)
- With Workbooks.Open(fds(i))
- For Each Sh In .Sheets
- ' If InStr(Sh.Name, "XXX") Then '¥i¥[¤W±ø¥ó ¦³«ü©w¤u§@¦WºÙ
- Sh.[A39:D99].Copy Rng '¦ý¨CÓsheet¸Ì §Ú¥unRange("A39:D99"),
- Set Rng = Sheets("¤u§@ªí2").Cells(Rows.Count, "a").End(xlUp).Offset(1)
- Debug.Print Rng.Address
- 'End If
- Next
- .Close 0
- End With
- Next
- End If
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 27
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 38
- ÂI¦W
- 0
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- window7
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2019-12-12
- ³Ì«áµn¿ý
- 2021-4-21
|
|
Ian
|
|
|
|
|
- ©«¤l
- 27
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 38
- ÂI¦W
- 0
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- window7
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2019-12-12
- ³Ì«áµn¿ý
- 2021-4-21
|
¦^´_ 4# GBKEE
½Ð°Ý¤@¤U
§Ú·Q§ï¼gªº¬O
.Sheets.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
¤W¦¡**¬°©Ò¶}±Ò¬¡¶Ã¯¤W©Ò¦³¤u§@ªí½Æ»s¨ìThisWorkbook(°õ¦æ¥¨¶°ªº¬¡¶Ã¯)¤U
(§â©Ò¦³¶}±Òªº¬¡¶Ã¯¤Wªº¬Y¤@¤u§@ªí ¤¤ªº(¦C¦p:Sheet("C").Range("A39:D99")¦Û°Ê½Æ»s¨ì§Ú«ü©wªºsheet(ie:"¤u§@ªí2")ªºA1¶}©l)
¦]¬°¶}±Òªº¤u§@ªí¥i¯à¦³«Ü¦hÓ(ie:sheet("C")/Sheet("C1") /Sheet("C2")....¦ý¨CÓsheet¸Ì §Ú¥unRange("A39:D99"),
¥i¥H§ï¼g¦¨ .Sheets.Range("A39:D99").Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
TKS |
|
Ian
|
|
|
|
|
- ©«¤l
- 27
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 38
- ÂI¦W
- 0
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- window7
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2019-12-12
- ³Ì«áµn¿ý
- 2021-4-21
|
¦p¦ó¸Ñ?????°õ¦æ¶¥¬q¿ù»~"1004"
¦U¦ì¤j¤j¦n
¤§«e¦b¦¹½×¾Â¤W¨Ï¥Î¤@Óvbaµ{¦¡,¥i¿ï¨ú¸ô¸g¸ê®Æ§¨ªºÀɮרèϨä¦ÛªF½Æ»s«á¶K¤W«ü©wªºSHEET
¦ý«o¥X²{ °õ¦æ¶¥¬q¿ù»~"1004"
§ä¤£¨ì". ½ÐÀˬdÀɦW¬O§_¦³«÷¿ù,©ÎÀɮצì¸m¬O§_¥¿½T.
µ{¦¡¦p¤U
Sheets("¤u§@ªí1").Activate
fds = Application.GetOpenFilename("Excel Files (*.xlsm;*.xlsx), *.xlsm;*.xlsx", , , , True)
If IsArray(fds) Then
For i = 1 To UBound(fds)
[A2].Offset(i - 1) = fds(i)
Next
End If
Sheets("¤u§@ªí1").Activate
For Each a In Range([A2], Cells(Rows.Count, 1).End(xlUp))
With Workbooks.Open(a)...................................................³o¥y¥X²{ERROR
.Sheets.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
.Close 0
End With
Next
Sheets("¤u§@ªí1 (2)").Activate
Range("A2").Select
Columns("A:A").EntireColumn.AutoFit
Sheets("¤u§@ªí1").Activate
End Sub
·Q³Â·Ð¦U¦ì¤j¤j¬Ý¤U,À°Ó¦£¶Ü? |
|
Ian
|
|
|
|
|