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

[µo°Ý] ½Ð°Ý­n¦p¦ó³]©wÅý¥¨¶°©¿²¤¿ù»~¡AÄ~Äò¸õ¤U¤@­Ó°õ¦æ(¥H¸Ñ¨M)

[µo°Ý] ½Ð°Ý­n¦p¦ó³]©wÅý¥¨¶°©¿²¤¿ù»~¡AÄ~Äò¸õ¤U¤@­Ó°õ¦æ(¥H¸Ñ¨M)

¥»©«³Ì«á¥Ñ ´Ñ»y³¾»ï ©ó 2011-7-15 19:34 ½s¿è
  1. Sub Macro1()
  2. '
  3. ' Macro1 Macro
  4. '

  5. '
  6.     Workbooks.OpenText Filename:= _
  7.         Range("C4"), Origin:= _
  8.         950, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
  9.         ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, Comma:=False, _
  10.         Space:=True, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3 _
  11.         , 1), Array(4, 1), Array(5, 1), Array(6, 1)), TrailingMinusNumbers:=True
  12.             ActiveWindow.SmallScroll Down:=15
  13.     Range("F32:G40").Select
  14.     Selection.Copy
  15.     Windows("test.xlsb").Activate
  16.     Sheets("sample1 (1)").Select
  17.     Range("B2").Select
  18.     ActiveSheet.Paste
  19.     Windows("Report.TXT").Activate
  20.     ActiveWindow.Close
  21.     Sheets("set print").Select
  22.     Range("B1").Select
  23.     Workbooks.OpenText Filename:= _
  24.         Range("C5"), Origin:= _
  25.         950, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
  26.         ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, Comma:=False, _
  27.         Space:=True, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3 _
  28.         , 1), Array(4, 1), Array(5, 1), Array(6, 1)), TrailingMinusNumbers:=True
  29.             ActiveWindow.SmallScroll Down:=15
  30.     Range("F32:G40").Select
  31.     Selection.Copy
  32.     Windows("test.xlsb").Activate
  33.     Sheets("sample1 (2)").Select
  34.     Range("B2").Select
  35.     ActiveSheet.Paste
  36.     Windows("Report.TXT").Activate
  37.     ActiveWindow.Close
  38.     Sheets("set print").Select
  39.     Range("B1").Select
  40.     Workbooks.OpenText Filename:= _
  41.         Range("C6"), Origin:= _
  42.         950, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
  43.         ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, Comma:=False, _
  44.         Space:=True, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3 _
  45.         , 1), Array(4, 1), Array(5, 1), Array(6, 1)), TrailingMinusNumbers:=True
  46.             ActiveWindow.SmallScroll Down:=15
  47.     Range("F32:G40").Select
  48.     Selection.Copy
  49.     Windows("test.xlsb").Activate
  50.     Sheets("sample1 (3)").Select
  51.     Range("B2").Select
  52.     ActiveSheet.Paste
  53.     Windows("Report.TXT").Activate
  54.     ActiveWindow.Close
  55.     Sheets("set print").Select
  56.     Range("B1").Select
  57. End Sub
½Æ»s¥N½X
½Ð°Ý­n¦p¦óÅý¦¹¬q¥¨¶°¡A¥X²{¿ù»~®É¡A©¿²¤¿ù»~¡AÄ~Äò¸õ¤U¤@¦æ°õ¦æ¡A¤£­n¸õ¥X°£¿ùµøµ¡???
·PÁÂ"a8350070" ¤j¤j«ü¾É~~

On Error Resume Next '¤£°»¿ù
Macro......
On Error GoTo 0 '¦^´_°»¿ù
My Blog
http://blog.xuite.net/a8350070

TOP

        ÀR«ä¦Û¦b : §g¤l¥ß«í§Ó¡A¤p¤H«í¥ß§Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD