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

[µo°Ý]§âExcel¸ê®Æ¬YÄæ¸ê®Æ¦s¨ì¥t¤@­Ó Txt ÀÉ®×

¦^´_ 1# cr123a
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng As Range, i As Integer
  4.     Set Rng = ActiveWorkbook.Sheets(1).Range("D1:D20")
  5.     i = 1
  6.     Do While Application.CountA(Rng.Columns(1)) > 0    '­pºâ½d³ò²Ä¤@Ä椺¦³¸ê®Æªº¦C¼Æ
  7.         With Workbooks.Add(1)
  8.             Rng.Copy .Sheets(1).Range("A1")
  9.             .SaveAs Filename:="D:\test\HABC-00" & i & ".tex", FileFormat:=xlUnicodeText, CreateBackup:=False
  10.             .Close True
  11.         End With
  12.         i = i + 1
  13.         Set Rng = Rng.Offset(20)  '©¹¤U¦ì²¾20¦C
  14.     Loop
  15. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD