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

§ì¨ú¥t¤@­ÓexcelÀɸê®Æ

§ì¨ú¥t¤@­ÓexcelÀɸê®Æ

½Ð°Ý¤@¤U¡A
§Ú·Q§ì°_©T©w¸ô®|¤UªºexcelÀɮתº¸ê®Æ
§Ú­n«ç»ò¥Î¥¨¶°¼g
«ô°U¦U¦ì¤j¤j«üÂI¤@¤U

¦^´_ 2# GBKEE

·Ð½Ð¤j¤j ½Ð¦A¦¸¨ó§U
§ì¨ú¥t¤@­ÓexcelÀɦp ÀɦW¦³©ÒÅܰʮɡA
¤Î¤£¦P¤u§@ªí¸ê®Æ®É¡AÀ³ ¦p¦ó³B²z¡C

Sub ÂàÀÉ1()¡@'­ì¤è®×
    Windows("³øªí1.xls").Activate
    Range("A2:E24").Select
    Selection.Copy   
    Windows("³øªí2.xls").Activate
    Range("A1").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Range("A1").Select   
End Sub


Sub ÂàÀÉ2() '­×§ï¤è®×

   [G2] = InputBox(" ½Ð¿é¤J  # ÀɦW #", " ÂàÀÉ¡G ¤µ¤é³øªí")   '¤âÁä 22

    Windows("³øªí1.xls").Activate   '­ì©lÀɦW
    Range("A2:E24").Select
    Selection.Copy
   
    Windows("³øªí" & [G2] & ".xls").Activate '¹w ½Æ»sÀÉ®× ¤§ ÀɦW¥i§_¬° [ÅܼÆ] =G2 Àx¦s®æ¤§¤º®e
    Range("A1").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Range("A1").Select      
End Sub
   
«ô°U ¤j¤j«üÂI¤@¤U ·PÁÂ!!
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

·PÁ¦U¦ì¤j¤jªº¦^ÂСA°ÝÃD¤w¸g¸Ñ¨M¤F Á°Õ

TOP

¥»©«³Ì«á¥Ñ ¦Ñ®L ©ó 2011-3-29 12:12 ½s¿è

³Ì²³æ©ö¥Îªº¤èªk:ª«¥ó³sµ²ªk

¤E¤j¥\¯àªí
´¡¤J>>ª«¥ó>>¦ÛÀɮפ¤«Ø¥ß>>¤Ä¿ï³sµ²>>§äURL>>½T©w

TOP

³oÃþ¾Þ§@­Ó¤H¸û¶É¦V©óADO+SQL
Sub test()
Dim CNN As New ADODB.Connection
Dim RST As New ADODB.Recordset
With CNN
.ConnectionString = "provider=microsoft.jet.oledb.4.0;" & _
"extended properties='Excel 8.0;hdr=no';" & _
"data source=D:\¥~³¡¸ê®Æ.xls"
.Open
End With
[A1].CopyFromRecordset CNN.Execute("select * from [SHEET1$A1:A10]")
End Sub
©ÎªÌª½±µ¥Î¸ê®Æ~¶×¤J¥~³¡¸ê®Æ¡A¤â¤u¬d¸ß¡I

TOP

¦^´_ 1# imzues
  1. Sub Ex()
  2.     Dim MySheet As Worksheet
  3.     Set MySheet = ActiveSheet
  4.     With Workbooks.Open("d:\test\¥~³¡¸ê®Æ.xls")
  5.         .Sheets(1).Range("a1:a10").Copy MySheet.Range("a1")
  6.         .Close 0
  7.     End With
  8. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD