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

[µo°Ý] ¦p¦ó¥t¦sµL°Ñ¼Æ¸ê®Æ»P¥¨¶°ªºÀÉ®×,¦A«ì´_Àɮ׭쪬¥H«K¦A¥t¦s¤U¤@­ÓÀÉ®×?

[µo°Ý] ¦p¦ó¥t¦sµL°Ñ¼Æ¸ê®Æ»P¥¨¶°ªºÀÉ®×,¦A«ì´_Àɮ׭쪬¥H«K¦A¥t¦s¤U¤@­ÓÀÉ®×?

¥»©«³Ì«á¥Ñ luhpro ©ó 2010-8-20 23:57 ½s¿è

¨Ï¥ÎÀô¹Ò : Windows XP + Office 2000 Professional

§Úª¾¹D­n¦s¦¨¨S¦³¥¨¶°ªºÀÉ®×¥i¥H¥Î SaveAs ¦s¦¨ FileFormat ¬° Excel4 ªºÀÉ®×.

¦]¬°­ì©lÀɮ׬O»Ý­n³sµ²¨ì¬Ý½L³nÅéÀH®É°ÊºA§ì¨ú¸ê®Æªº,
¦b¦U§OªO¤ÍªºPC¤W°õ¦æ¥i¯à·|¦³°ÝÃD,
¬G§ï¦¨¥t¤@­Ó´ú¸Õ¥ÎÀɮרӼÒÀÀ¦¹»Ý¨D.

¤j­P¤Wªº»Ý¨D¬OÀɮפW¥u¦³³æ¤@­Ó Sheet,
Sheet ¤W°Ï¤À¦¨¨â­Ó°Ï°ì : µ²ªG°Ï »P °Ñ¼Æ°Ï (¦³¤½¦¡,¦³Àx¦s®æ­Ó§O®æ¦¡)
­ì¥ýªì¨Bªººc·Q¬O§â °Ñ¼Æ¸ê®Æ ª½±µ³£³Æ¥÷¦b°Å¶Kï¤W,
µ¥ (¥h±¼°Ñ¼Æ¸ê®Æ»P¥¨¶°) ¥t¦sÀɮ׫á¦A¶K¦^¥h­ì¨Óªº¦a¤è,
¦ý¬O¨º­Ó¦sÀɪº°Ê§@¤@°µ¹L«á°Å¶Kï¤Wªº¸ê®Æ´N®ø¥¢¤F,
¥H¦Ü©ó¨S¸ê®Æ¥i¥HÁÙ­ì¦^¥h.

¨ä¦¸¬O¦Ò¶q¶}­Ó¼È®Éªº Sheet Object ¨Ó¦s©ñ°Ñ¼Æ¸ê®Æ,
¥u¬O¤@¥¹µJÂI¤Á¹L¥h­n¦A¤Á¦^¨Ó¾Þ§@´N·|¥X²{¿ù»~,
¦]¦Ó°õ¦æ¤£¤U¥h. (¦pªþ¥ó ´ú¸Õ¥Î.zip (9.66 KB) )
§Ú²q´ú¥i¯à¬O¦]¬°¥L­Ì¬O¨â­Ó¤£¦PªºÀɮ׾ɭP,
¨º»ò¬O§_¦³¨ä¥L¦nªº¤è¦¡¥i¥H³Æ¦s¨º¨Ç°Ñ¼Æ¸ê®Æ,
¥H«K¦sÀÉ«áÄ~Äò²£¥Í¤U¤@­ÓÀɮתº¸ê®Æ©O?

PS. ¹ê»Ú¤WªºÀɮצ³¥Î¨ì¨º¨Ç¦@¥Î°Ñ¼Æ¸ê®Æ(¤½¦¡,®æ¦¡...µ¥),
¤£¹L±q¥t¤@­Ó³nÅ餤Âà¹L¨Óªº¸ê®Æ¨C¦¸³£¤£¦P -> ¨C¦¸³£·|²£¥Í¤£¦Pªºµ²ªG¸ê®Æ.

¥t¦³¬Ý¹LExcel VBA»¡©úÀÉÁöµM¦³¬Ý¨ì DataObject ªº¬ÛÃö±Ô­z,
«oµo²{®M¥Î¤W¥h·|»¡¨Ï¥ÎªÌ®æ¦¡¥¼©w¸q¤£Åý¥Î?
¦ý³o¤£¬O Excel ¦Û¤v©w¸qªºªF¦è¶Ü?

¥¨¶°¼g¦b¤@¯ë¼Ò²Õ
Sheets(1).Copy
ActiveWorkbook.SaveAs
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥¨¶°¼g¦b¤@¯ë¼Ò²Õ
Sheets(1).Copy
ActiveWorkbook.SaveAs
Hsieh µoªí©ó 2010-8-21 00:00


¸Õ¹L¤£¦æ©O.

Sub aa()
  With Sheets("¼ËªO").[L134]
    .Copy
    .Clear
   
    ActiveWorkbook.SaveAs Filename:="1234.xls", FileFormat:=xlExcel4

    .[L1].PasteSpecial
  End With
End Sub

Clear °õ¦æ«á°Å¶Kï¤Wªº¸ê®Æ´N®ø¥¢¤F,
¦ü¥G·|°O¾Ð¥¦ªº¸ê®Æ¬O±q­þ¸Ì¶K¹L¨Óªº,
¦Ó¨Ó·½¸ê®Æ¤@¥¹³Q²M±¼«á¥¦ªº¸ê®Æ¤]·|³Q¦P¨B²M±¼?

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-8-21 13:38 ½s¿è

[code]Sub getnewbook()
Application.DisplayAlerts = False
With Sheets("¼ËªO")
   .Copy
   With ActiveWorkbook
    .ActiveSheet.Columns("A:K").Clear
    .SaveAs "E:\1234.xls"
  End With
Application.DisplayAlerts = True
End With
End Sub
´ú¸Õ¥Î.rar (10.78 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh

¥i¯à¬O§Úªº±Ô­z¦³¤£²M·¡ªº¦a¤è,
¥ªÃä A ~ E Ä檺¸ê®Æ¬O­n¥t¦s¨ì¤@­Ó (¨S¦³¥¨¶°»P¨S¦³¥kÃä L ~ Q Äæ³o¨Ç °Ñ¼Æ¸ê®Æ ªº) ÀÉ®×,
¦s§¹«áµe­±¦^¨ì¨S¦³¥ô¦ó­×§ïªºª¬ºA (¤]´N¬O¦³ L ~ Q Äæ³o¨Ç °Ñ¼Æ¸ê®Æ »P ¥¨¶°µ{¦¡)
¤£ª¾³o¼Ëªº»Ý¨D¬O§_¥i¥H¹F¨ì©O?

ÁÂÁÂ Hsieh ¤j¤j...

TOP

¦^´_ 5# luhpro


    ¨º´N§R°£L:Q
¦sÀÉÃö³¬
  1. Sub getnewbook()
  2. Application.DisplayAlerts = False
  3. With Sheets("¼ËªO")
  4.    .Copy
  5.    With ActiveWorkbook
  6.     .ActiveSheet.Columns("L:Q").Clear
  7.     .SaveAs "E:\1234.xls"
  8.     .Close
  9.   End With
  10. Application.DisplayAlerts = True
  11. End With
  12. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2010-8-23 20:28 ½s¿è

¦^´_ 6# Hsieh

¤Óº}«G¤F.^^
³o´N¬O§Ú·Q­nªºµ²ªG.

¸Õ¹L«Ü¦hºØ¤è¦¡,
»¡©ú¸Ìªº¨Ò¤l¤@­Ó¤@­Ó¸Õ¤F«Ü¦h³£¥¢±Ñ.
­ì¨Ó¥u­n¥ý Copy ¹L,
©ó SaveAs ¹L«á¤§«e­×§ï¹Lªºª¬ºA¦Û¤v´N·|ÁÙ­ì¤F,
³o¦b Excel VBA ªº»¡©ú¸Ì¦ü¥G®Ú¥»§ä¤£¨ì¬ÛÃö±Ô­z.

¸Õ¹L«á¸Ì­±§Ú¥u§ï¤F¤@¦æ
  .SaveAs Filename:="D:\1234.xls", FileFormat:=xlExcel4
´N¥i¥H§¹¥þ¹F¨ì¦¹¥Øªº¤F.

¥t¥~­º½g¤¤©Ò°Ýªº Excel 2000 Professional ªº»¡©ú¸ÌÁöµM¦³ DataObject ªº½d¨Ò,
¦ý¹ê»Ú®M¥ÎExcel«o·|»¡¤£»{Ãѳo­Ó¸ê®Æ«¬ºA,
¤£ª¾¹D¬O¤£¬OÁÙ­n¶}±Ò¤°»ò¶µ¥Ø¥¦¤~¯à¥¿±`¨Ï¥Î¦¹¸ê®Æ§ÎºA©O?

ÁÂÁÂ Hsieh ¤j¤j...

¦^´_ 8# Hsieh
­ì¨Ó¦bºô¯¸¤º¦³¸ê®Æ,
´¿¸g¹Á¸Õ¥hºô¯¸¤¤§ä¤@¨Ç¸ê°T,
¦ý¦ü¥G¨S¿ìªk°µ¥þ¯¸©Î³æªO¤å³¹ªº·j´M,
¥u¯à¤@­¶¤@­¶³v¤@´M§ä§ä¨ì²´ªáªá...

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-8-21 15:03 ½s¿è

¦^´_ 7# luhpro


http://gb.twbts.com/index.php/topic,1878.0.html
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD