½Ð°Ývba¨Ï¥Î¨t²Î¤º«Ø¨Ó¸ÑÀ£ÁYzip??
- ©«¤l
- 6
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 37
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2014-4-15
- ³Ì«áµn¿ý
- 2019-1-15
|
½Ð°Ývba¨Ï¥Î¨t²Î¤º«Ø¨Ó¸ÑÀ£ÁYzip??
±z¦n!
½Ð±Ð¦U¦ì«e½ú
¥Ø«e¤p§Ì·Q¨Ï¥Î¥H¤U¨Ó¸ÑÀ£ÁY
Fname = Application.GetOpenFilename(filefilter:="Zip Files (*.zip), *.zip", MultiSelect:=False)
FileNameFolder = ThisWorkbook.Path & "\" & folder_name & "\"
Worksheets("¤u§@ªí1").Range("F2") = FileNameFolder
Set oApp = CreateObject("Shell.Application")
oApp.Namespace(FileNameFolder).CopyHere oApp.Namespace(Fname).items
¥Ø«e´ú¸Õ¦¨¥\¡A
¦ý¨Ï¥Î³o¤è¦¡¡AÁٻݿï¾Ü©Ò»Ýn¸ÑÁYªºÀɮסA
½Ð°Ý¬O§_¥i¥H¤£»Ý¿ï¾Ü¦Ó¦Û¦æ¸ÑÀ£ÁY
ps.ÀɮצWºÙ»P¸ê®Æ§¨¦WºÙÂ^¨ú¦ÛWorksheets("¤u§@ªí1").Range("F2")
¸ü·Ð½Ð¦U¦ì«e½ú«ü¾É
ÁÂÁÂ |
|
|
|
|
|
|
- ©«¤l
- 75
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »OÆW
- µù¥U®É¶¡
- 2014-9-22
- ³Ì«áµn¿ý
- 2015-3-7
|
¦^´_ 1# lshsien
¸Õ¸Õ¬Ý¡A¬O¤£¬O³o¼Ë?- Sub ¸ÑÀ£ÁY¤å¥ó()
- Dim Rarexe As String 'WINRAR°õ¦æ¤å¥óªº¦ì¸m
- Dim FileString As String 'Shell«ü¥O¤¤ªº¦r²Å¦ê
- Dim Result As Long
- Rarexe = "C:\program files\winrar\winrar" 'WINRAR°õ¦æ¤å¥óªº¦ì¸m
- '[B1]Äæ¦ì ¸ÑÀ£ÁY«eªºì©l¤å¥ó
- '[B2]Äæ¦ì ¸ÑÀ£ÁY«áªº¥Ø¦a¤å¥ó
- FileString = Rarexe & " x " & "-Y " & [B1] & " " & [B2] '«ü©w-Y ¶}Ãö¡A¡§¬O¡¨¬°Àq»{È¡A¨Ã¦Û°Ê¦^À³¥þ³¡ªº¸ß°Ý¡C
- Result = Shell(FileString, vbHide)
- End Sub
½Æ»s¥N½X ÁÙ¦³¥t¤@Ó§ó«K§Qªº¤èªk¡A¦ý§Ú¥\¤O¤£°÷²`«p¡An½Ð°ª¤â¨ÓÀ°¦£¤F¡ã
µ{¦¡½X¦p¤U¡A»Ý¥t¥~¶K¦b¤W±µ{¦¡ªº³Ì¤W¤è
³o¤èªk¬Oª½±µÂIÄæ¦ì¡A´N·|¦Û°Ê±a¥X¸ô®|- Option Explicit
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Dim gb As FileDialog '«Å§i¤@ÓÀÉ®×¹ï¸Ü®Ø
- 'Dim fd As FileDialog '«Å§i¤@ÓÀÉ®×¹ï¸Ü®Ø
- Set gb = Excel.Application.FileDialog(msoFileDialogFilePicker) '³]©w¿ï¨úÀÉ®×¥\¯à
- 'Set fd = Application.FileDialog(msoFileDialogFolderPicker) '³]©w¿ï¨ú¸ê®Æ§¨¥\¯à
-
- With Target(1)
- If .Address = "$B$1" Then If gb.Show Then .Cells = gb.SelectedItems(1) 'ÂI¿ïþÓÄæ¦ìÀx¦s®æ,Àɮ׸ô®|¨q¦b¨ºÓÄæ¦ì
- 'If .Address = "$B$2" Then If fd.Show Then .Cells = fd.SelectedItems(1) 'ÂI¿ïþÓÄæ¦ìÀx¦s®æ,Àɮ׸ô®|¨q¦b¨ºÓÄæ¦ì
- End With
- End Sub
½Æ»s¥N½X |
-
-
¸ÑÀ£ÁY.rar
(8.16 KB)
|
§Ú«Ü²Â,©Ò¥H§Ú«Ü¥Î¤ß
¡@§Ú¾ÇÃÀ¤£ºë,¦ý§Ú´÷¨Dª¾ÃÑ
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 1# lshsien
§A¼g¤Ï¤F§a
Fname = Worksheets("¤u§@ªí1").Range("F2").value '±qF2¨ú±ozipÀɸô®|
FileNameFolder = ThisWorkbook.Path & "\" & folder_name & "\" '¸ÑÀ£ÁY¦ì¸m
Set oApp = CreateObject("Shell.Application")
oApp.Namespace(FileNameFolder).CopyHere oApp.Namespace(Fname).items |
|
|
|
|
|
|
- ©«¤l
- 6
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 37
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2014-4-15
- ³Ì«áµn¿ý
- 2019-1-15
|
·PÁ»k¥ú°j¯T¤j¤j
¤w¸g¸ÕÅ禨¥\¤F
·PÁÂstillfish00§ó¥¿ |
|
|
|
|
|
|
- ©«¤l
- 75
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »OÆW
- µù¥U®É¶¡
- 2014-9-22
- ³Ì«áµn¿ý
- 2015-3-7
|
¦^´_ 4# lshsien
§A¥Î¸Õ¦¨¥\ªº¤èªk¬O
¡@¥i§_¤À¨É¤@¤U¡A¤¬¬Û¾Ç²ß |
|
§Ú«Ü²Â,©Ò¥H§Ú«Ü¥Î¤ß
¡@§Ú¾ÇÃÀ¤£ºë,¦ý§Ú´÷¨Dª¾ÃÑ
|
|
|
|
|
- ©«¤l
- 75
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »OÆW
- µù¥U®É¶¡
- 2014-9-22
- ³Ì«áµn¿ý
- 2015-3-7
|
¦^´_ 3# stillfish00
stillfish00 ¤j¤j¡G
¡@½Ð°Ý¥H¤Uµ{¦¡n«ç»ò§ï¡A¤~¯à¨âÓ±ø¥ó³£¦¨¥ß¡A¨Ã¥¿±`°õ¦æµ{¦¡?- Option Explicit
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Dim gb As FileDialog '«Å§i¤@ÓÀÉ®×¹ï¸Ü®Ø
- 'Dim fd As FileDialog '«Å§i¤@ÓÀÉ®×¹ï¸Ü®Ø
- Set gb = Excel.Application.FileDialog(msoFileDialogFilePicker) '³]©w¿ï¨úÀÉ®×¥\¯à
- 'Set fd = Application.FileDialog(msoFileDialogFolderPicker) '³]©w¿ï¨ú¸ê®Æ§¨¥\¯à
- With Target(1)
- If .Address = "$B$1" Then If gb.Show Then .Cells = gb.SelectedItems(1) 'ÂI¿ïþÓÄæ¦ìÀx¦s®æ,Àɮ׸ô®|¨q¦b¨ºÓÄæ¦ì
- 'If .Address = "$B$2" Then If fd.Show Then .Cells = fd.SelectedItems(1) 'ÂI¿ïþÓÄæ¦ìÀx¦s®æ,Àɮ׸ô®|¨q¦b¨ºÓÄæ¦ì
- End With
- End Sub
½Æ»s¥N½X |
|
§Ú«Ü²Â,©Ò¥H§Ú«Ü¥Î¤ß
¡@§Ú¾ÇÃÀ¤£ºë,¦ý§Ú´÷¨Dª¾ÃÑ
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¥»©«³Ì«á¥Ñ stillfish00 ©ó 2014-11-5 00:09 ½s¿è
¦^´_ 6# »k¥ú°j¯T
Y¬O¤@ÓÀɮפ@Ó¸ê®Æ§¨:- Option Explicit
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Dim gb As FileDialog '«Å§i¤@ÓÀÉ®×¹ï¸Ü®Ø
- Dim fd As FileDialog '«Å§i¤@ÓÀÉ®×¹ï¸Ü®Ø
- With Target(1)
- If .Address = "$B$1" Then
- Set gb = Excel.Application.FileDialog(msoFileDialogFilePicker) '³]©w¿ï¨úÀÉ®×¥\¯à
- If gb.Show Then .Cells = gb.SelectedItems(1) 'ÂI¿ïþÓÄæ¦ìÀx¦s®æ,Àɮ׸ô®|¨q¦b¨ºÓÄæ¦ì
- ElseIf .Address = "$B$2" Then
- Set fd = Application.FileDialog(msoFileDialogFolderPicker) '³]©w¿ï¨ú¸ê®Æ§¨¥\¯à
- If fd.Show Then .Cells = fd.SelectedItems(1) 'ÂI¿ïþÓÄæ¦ìÀx¦s®æ,Àɮ׸ô®|¨q¦b¨ºÓÄæ¦ì
- End If
- End With
- End Sub
½Æ»s¥N½X |
|
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C
|
|
|
|
|
- ©«¤l
- 75
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »OÆW
- µù¥U®É¶¡
- 2014-9-22
- ³Ì«áµn¿ý
- 2015-3-7
|
¦^´_ 7# stillfish00
ÁÂÁ stillfish00 ¤j¤jªº¦^µª¡A¥i¥H¥¿±`°õ¦æ¤F¡A¸U¤À·PÁ¡ã |
|
§Ú«Ü²Â,©Ò¥H§Ú«Ü¥Î¤ß
¡@§Ú¾ÇÃÀ¤£ºë,¦ý§Ú´÷¨Dª¾ÃÑ
|
|
|
|
|
- ©«¤l
- 361
- ¥DÃD
- 57
- ºëµØ
- 0
- ¿n¤À
- 426
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2003,2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-13
- ³Ì«áµn¿ý
- 2022-12-8
|
³æ¤@Àɮ׳æ¤@¸ô®|¸ÑÀ£¦¨¥\¡A¯d¤U¬ö¿ý°Ñ¦Ò°Ñ¦Ò¡I- Sub vba_unzip()
- Dim oApplicationlication As Object
- Dim fileName As Variant
- Dim folderFileName As Variant
- 'fileName = Application.GetOpenFilename(filefilter:="Zip Files (*.zip), *.zip", MultiSelect:=False)
- fileName = "E:\´Á¥æ©Ò\opdata\OptionsDaily_2018_02_21.zip"
- folderFileName = "e:\test\"
- 'MkDir folderFileName
- Set oApplication = CreateObject("Shell.Application")
- oApplication.Namespace(folderFileName).CopyHere oApplication.Namespace(fileName).items
- DoEvents
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|