¦p¦ó¥ÎFileDialog¤è¦¡¶}±Ò¸ê®Æ¨Ã±N¨ä¤º®e¶K¤W
- ©«¤l
- 18
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 24
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- s
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2018-5-7
- ³Ì«áµn¿ý
- 2022-8-9
|
¦p¦ó¥ÎFileDialog¤è¦¡¶}±Ò¸ê®Æ¨Ã±N¨ä¤º®e¶K¤W
|
|
|
|
|
|
- ©«¤l
- 406
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 453
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS 7
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2015-2-7
- ³Ì«áµn¿ý
- 2021-7-31
|
¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-4-9 13:54 ½s¿è
¦^´_ 5# n7822123
¼g²µu¤@ÂI¡A¨Ã¦^¨ì«ö¶s¶(¹³¬O¤°»ò³£¨Sµo¥Í)
- Sub ¿ïÀɶK¤W()
- Application.ScreenUpdating = False
- Set ¦¹ªí = ActiveSheet: Set Dataªí = Sheets("Data")
- With Application.FileDialog(msoFileDialogFilePicker)
- .Filters.Clear
- .Filters.Add "ExcelÀÉ®×", "*.xls*"
- .InitialFileName = ThisWorkbook.Path
- .AllowMultiSelect = True
- If .Show = 0 Then Exit Sub
- For Each FN In .SelectedItems
- With Workbooks.Open(FN).Sheets(1): Dataªí.Activate
- If [A1] = "" Then
- .[A1].CurrentRegion.Copy [A1]
- Else
- .[A1].CurrentRegion.Offset(1).Copy [A1].End(4).Offset(1)
- End If
- .Parent.Close False
- End With
- Next
- End With
- Dataªí.Columns.AutoFit: ¦¹ªí.Activate
- Set ¦¹ªí = Nothing: Set Dataªí = Nothing
½Æ»s¥N½X
FileDialog-OK.rar (31.72 KB)
|
|
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U
|
|
|
|
|
- ©«¤l
- 406
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 453
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS 7
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2015-2-7
- ³Ì«áµn¿ý
- 2021-7-31
|
¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-4-9 13:05 ½s¿è
¦^´_ 3# peter631114
¸Õ¸Õ¬Ý¡AÃiªº¼gµù¸Ñ¤F¡A¦³°ÝÃD¦A°Ý- Sub ¿ïÀɶK¤W()
- Dim ExFile()
- Application.ScreenUpdating = False
- With Application.FileDialog(msoFileDialogFilePicker)
- .Filters.Clear
- .Filters.Add "ExcelÀÉ®×", "*.xls*"
- .InitialFileName = ThisWorkbook.Path
- .AllowMultiSelect = True
- If .Show = 0 Then Exit Sub
- ReDim ExFile(1 To .SelectedItems.Count)
- For Each FN In .SelectedItems: n% = n% + 1: ExFile(n) = FN: Next
- End With
- Set ¦¹ªí = ActiveSheet: Set Dataªí = Sheets("Data")
- For Each FN In ExFile
- With Workbooks.Open(FN).Sheets(1): Dataªí.Activate
- If [A1] = "" Then
- .[A1].CurrentRegion.Copy [A1]
- Else
- .[A1].CurrentRegion.Offset(1).Copy [A1].End(4).Offset(1)
- End If
- .Parent.Close False
- End With
- Next
- Dataªí.Columns.AutoFit
- Set ¦¹ªí = Nothing: Set Dataªí = Nothing: Erase ExFile
- End Sub
½Æ»s¥N½X
FileDialog-OK.rar (35.26 KB)
|
|
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U
|
|
|
|
|
- ©«¤l
- 11
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 58
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN200
- ³nÅ骩¥»
- NA
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2020-1-21
- ³Ì«áµn¿ý
- 2022-3-31
|
¦^´_ 1# peter631114
¤£À´§Aªº·N«ä ¦p¦ó¬On±NFileDialog¸ô®|¶K¤Wªº¸Ü ¥i¥H°Ñ¦Ò³oÓ¡A
±N§A¶}±Òªº¸ô®|¦W¶K¨ìA1Àx¦s®æ¡G
If fDialog.Show = -1 Then
Range("A1").Value = fDialog.SelectedItems(1)
End If |
|
|
|
|
|
|
- ©«¤l
- 18
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 24
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- s
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2018-5-7
- ³Ì«áµn¿ý
- 2022-8-9
|
|
|
|
|
|
|
- ©«¤l
- 18
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 24
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- s
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2018-5-7
- ³Ì«áµn¿ý
- 2022-8-9
|
¦³¤@Ó¥H¤WªºÀÉ®×,¦p¦ó§Q¥ÎFileDialog¤è¦¡´M§äÀÉ®×,¨Ã±NÀɮתº¤º®eCopy¦ÜSheet(Data)¤º
¦]Àɮפº®e²Ä¤@Äæ¼ÐÃD¬Ò¤@¼Ë,©Ò¥H¥u»ÝCopy ¤@¦¸§Y¥i |
|
|
|
|
|
|