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

¬Û¦PÀÉ®×Âл\»yªk

¬Û¦PÀÉ®×Âл\»yªk

·Q½Ð°Ý¤@¤U¡A¦p¦ó¥ÎEXCEL VBA ¼g¦sÀɮɬO§_¨ú¥Nªº»yªk©ÎMsgBOX???

¦^´_ 1# if208808
  1. Option Explicit
  2. Sub Ex()  'SaveCopyAs ±N«ü©w¬¡­¶Ã¯ªº³Æ¥÷Àx¦s¨ìÀɮסA¦ý¤£Åܧó°O¾ÐÅ餤¤w¶}±Òªº¬¡­¶Ã¯¡C
  3.     Dim F As String, M As String
  4.     F = "D:\Test.xls"
  5.     M = "¥t¦s·sÀÉ"
  6.     If Dir(F) <> "" Then M = F & " Àɮפw¦s!!! , ¦b§_­n¨ú¥N¥¦?"
  7.     If MsgBox(M, vbYesNo) = vbYes Then Me.SaveCopyAs F
  8. End Sub
  9. Sub Ex1() 'SaveAs  ±N¹ï¬¡­¶Ã¯ªºÅܧóÀx¦s¨ì¨ä¥LÀɮסC
  10.     'SaveAs  ¨S¦³¬Û¦PÀɦW,¨t²Î¤£·|¸ß°Ý.
  11.     'Application.DisplayAlerts = True   '¨t²Î¹w³]¬° True ¤]¥iµù¸Ñ¤£¥Îªº
  12.     '¦p°õ¦æ¥¨¶°®É Microsoft Excel Åã¥Ü¯S©wªºÄµ§i©M°T®§«h¬° True
  13.     On Error Resume Next
  14.     Me.SaveAs "D:\Test.xls"
  15. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD