- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-4-22 17:29 ½s¿è
¦^´_ 28# PJChen
§ó¥¿- Sub Try()
- Windows("Shipping for ACE.xlsx").Activate
- Sheets("Booking").Select
- Dim Rng(1 To 2), Fs As Object, A As Object, E As Range
- 'ק令 Rng(1 To 2)
- Application.ScreenUpdating = False
- With Workbooks("Shipping for ACE.xlsx") '½Ð§ï¦¨n½Æ»s¬¡¶Ã¯ªº¦WºÙ(¤w¸g¥´¶})
- Set Rng(1) = .Sheets("Booking").[B1:B40] 'Rng(1) ¤u§@ªín½Æ»sªº½d³ò
- Set Rng(2) = .Sheets("Booking").[A1]
- Rng(2) = Rng(2) & "_" & Rng(2).Offset(1)
- End With
- Set Fs = CreateObject("Scripting.FileSystemObject") 'FileSystemObject ª«¥ó ´£¨Ñ¹ï¹q¸£Àɮרt²Îªº¦s¨ú¡C
- Set A = Fs.CreateTextFile("P:\TXT\" & Rng(2) & ".txt", True) '«Ø¥ß¤å¦rÀÉ®×
- For Each E In Rng(1) '¨Ì§Ç³B¸Ì½Æ»s½d³òªºÀx¦s®æ
- A.WriteLine (E.Text) 'Àx¦s®æ¼g¤J¤å¦rÀÉ
- Next
- A.Close
- Shell "Cmd /c start P:\TXT\" & Rng(2) & ".txt" '¦Û°Ê¥´¶}TXTÀÉ
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|