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

[µo°Ý] ¦p¦ó»s§@VBA¦sÀɶs?

[µo°Ý] ¦p¦ó»s§@VBA¦sÀɶs?

½Ð°Ý¤j¤j­ÌVBA­n¦p¦ó¼g«ü©wÀx¦s®æ·íÀɦWµM«á½Æ»s¯S©w¤u§@ªí¥X¨Ó¦sÀÉ:dizzy:

¯àÅý³o¤T­ÓVBAªº°Ê§@¼g¦b¦P¤@­Ó«ö¶s¸Ì­±¶Ü?

¶¶§Çªº¸ÜÀ³¸Ó¬O¥ý½Æ»s¯S©w¤u§@ªí¥X¨Ó¦A«ü©wÀx¦s®æ·íÀɮצWºÙ(§t¸ô®|¦b¤º)¤§«á¦A¦sÀÉ

Sub TEST()
Dim uP$, FileN$
uP = ThisWorkbook.Path & "\" '¦sÀɸô®|
FileN = [A1] & ".xls" 'ÀɮצWºÙ(§t°ÆÀɦW)
Application.DisplayAlerts = False
Sheets("Sheet1").Copy '«ü©w¤u§@ªí
With ActiveWorkbook
¡@¡@¡@.SaveAs uP & FileN
¡@¡@¡@.Close
End With
End Sub

TOP

¦^´_ 2# ­ã´£³¡ªL


    ÁÂÁ«e½ú~~¤p§Ì§Ú²{¦b¸Õ°µ¬Ý¬Ý

¦]¬°¤p§Ì§Ú¸£³U¤£¤Ó·|Åܳqµ{¦¡½X©Ò¥H¦Û¤v«ÜÃø¼g¥X¨Ó

TOP

.SaveAs uP & FileN<<«e­±°ÆÀɦWªº³¡¤À§ï¦¨xltx³o¸Ì´N¤£¯à¹B§@¤F
·Q½Ð°Ý³o¤@¬q¬O¤°»ò·N«ä?

TOP

¦^´_ 4# ³Á­»µU

.SaveAs=¬°¥t¦sÀÉ®×

uP©MFileN¬OÅܼƦWºÙ¡A¦Óup¥Nªí¸ô®|¡AFileN¬°ÀɮצWºÙ

¦Ó­ã¤jªºµ{¦¡½X uP = ThisWorkbook.Path ==>·N«ä¬O¥Ø«eµ{¦¡ÀɮשҦbªº¸ô®|¡A¦b³o¸Ì§Ú­Ì¥ý°²³]¬° "D:\"
   
FileN = [A1] & ".xls"==>¬OA1Àx¦s®æªº­È¬°ÀɮצWºÙ¡A³o¸Ì¥ý°²³]¬° "AAA"

& ¬Oµ²¤å¦r³sµ²²Å¸¹¡A¬O±NAAA³sµ²°ÆÀɦW.xls µ²ªG·|¬O "AAA.xls"

¦P²z
.SaveAs uP & FileNªº·N«ä¬°=>¥t¦sÀɮצWºÙ¬° "D:\AAA.xls" ªº·N«ä

¥t¥~¬¡­¶Ã¯°ÆÀɮפ£¥i¬°".xltx" À³¸Ó¬O ".xlsx"

TOP

¨º¦pªG¬O¥t¦s·sÀÉ­n´«¦ì¤l­n«ç»ò¼g?

TOP

¦Ó¥B¦sÀɤ@¦¸«á´N¤£¯à¥Î¤F

TOP

        ÀR«ä¦Û¦b : ¬O«D·í±Ð¨|¡AÆg¬ü§@ĵ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD