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

¥t¦s·sÀÉ°ÝÃD

¥t¦s·sÀÉ°ÝÃD

¨Ï¥Î ActiveWorkbook.SaveAs Filename:=newfilename ¥t¦s·sÀÉ®É
­YÀɮפw¦s¦b, ·|¥X²{ĵ§iµøµ¡, ¬O§_¨ú¥N²{¦³ÀÉ®×
·í¿ï¾Ü¤£¨ú¥N²{¦³ÀÉ®×, §Y¥X²{¿ù»~

½Ð°ÝÀ³¦p¦ó­×§ïµ{¦¡, ¥i¿ï¾Ü¨ú®ø¤£Àx¦s, ©Î§ó§ïÀɮצWºÙ¥t¦s·sÀÉ

¥t¥~, ­Y·Qª½±µ¨ú¥NÂÂÀÉ®×,  ¤£Åã¥Üĵ§i, ¤SÀ³¸Ó¦p¦ó

½Ð«ü±Ð

¥»©«³Ì«á¥Ñ kimbal ©ó 2012-6-28 13:39 ½s¿è

§ä¥XÀɮ׬O¤£¬O¤w¸g¦s¦b,¦s¦bªº¸Ü,§âÀɦW¥[¤W®É¶¡¦s°_¨Ó. (¨Ò¦pc:\abc20120628133801.xls)
  1. Dim strExist As String
  2. dim strFolder as string
  3. dim strFilename as string
  4. strFolder = "c:\"
  5. strFilename="abc"
  6. strExist = Dir(strFolder & strFilename & ".xls")
  7. If strExist = "" Then
  8.    ActiveWorkbook.SaveAs Filename:=strFolder & newfilename & ".xls"
  9. else
  10.    ActiveWorkbook.SaveAs Filename:=strFolder & newfilename & format(now(),"yyyymmddhhmmss") & ".xls"
  11. End If
½Æ»s¥N½X
ª½±µ¨ú¥N (§â´£¥Ü°±±¼)
  1. application.displayalerts=false
  2. ActiveWorkbook.SaveAs Filename:=newfilename
  3. application.displayalerts=true
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¥»©«³Ì«á¥Ñ enoch ©ó 2012-6-28 16:20 ½s¿è

ÁÂÁ kimbal «ü±Ð, §Ú¸Õ¨ì¥t¥~¤èªk, ·Q¤À¨É¤@¤U



On Error Resume Next
ActiveWorkbook.SaveAs Filename:="book1"

If Err <> 0 Then '¨ú®ø¥t¦s·sÀÉ®ÉÅã¥Ü
Application.Dialogs(xlDialogSaveAs).Show

TOP

¦^´_ 3# enoch
On Error Resume Next  °£«D½T©w¿ù»~ÂI¥i©¿²¤ ,§_«h¤£»´©ö¨Ï¥Î
  1. Option Explicit
  2. Sub Ex()
  3.     Dim xlMsg As String, Newfilename As String, xlSave As Integer
  4.     Newfilename = "D:\TEST.XLS"
  5.     xlMsg = IIf(Dir(Newfilename) <> "", "Âл\ÀÉ®×", "Àx¦sÀÉ®×")
  6.     xlSave = MsgBox(Newfilename & Chr(10) & xlMsg & ":¬O(Y), ¥t¦sÀÉ®×:§_(N),¤£¦sÀÉ®×:¨ú®ø", vbYesNoCancel)
  7.     'xlSave ¶Ç¦^ vbYes, vbNo , vbCancel ¤T¿ï¤@
  8.     Application.DisplayAlerts = False
  9.     If xlSave = vbYes Then
  10.         ActiveWorkbook.SaveAs Filename:=Newfilename
  11.     ElseIf xlSave = vbNo Then
  12.         With Application.FileDialog(msoFileDialogSaveAs)
  13.             .InitialFileName = Newfilename
  14.             If .Show = -1 Then ActiveWorkbook.SaveAs Filename:=.SelectedItems(1)
  15.         End With
  16.     End If
  17.     Application.DisplayAlerts = True
  18. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ enoch ©ó 2012-6-29 12:46 ½s¿è

¦hÁÂGBKEE , ¯uªº±Ð¤F§Ú«Ü¦h

Application.FileDialog ¤ñ Application.Dialogs
§ó¥[¦n¥Î, ¥i¥H¥[¤W¤Þ¼Æ, ¹w¥ý³]©wÀɮצWºÙµ¥¸ê®Æ

¦]¬°¦³®É·Q¤£¨ì¨ä¥¦¤èªk,  ¤~·|¥Î
On Error Resume Next

­Y¥Î§¹¤§«á§Y®É¥[¤W
On error goto 0  ¥i¥H¶Ü


¸Õ§¹µ{¹L, ¦ý¦³¤Ö¤Ö°ÝÃD·Q¦A½Ð±Ð
¦p¦ó±±¨î¬OOFFICE 03 ".XLS" ÀɮשO?
¦]¬°µ{¦¡¥i¯à¦b¤£¦PEXCELª©¥»¤¤¨Ï¥Î
ÁöµM©úºÙ¬OTEST.XLS , ¦ýÀÉ®×Ãþ«¬³£¥i¯àÂà¤F¨ä¥¦ª©¥»

TOP

¦^´_ 5# enoch
µ{¦¡¤W ¬O¥i¥H¦p¦¹ªº

TOP

¦ý¸Õ¹L­Y°õ¦æµ{¦¡«e, §ó§ï¹LÀx¦sÀɮתºÃþ«¬,
¨Ò¦p¤§«e°õ¦æ¹LÀÉ®×>>¥t¦s·sÀÉ>>¿ï¾Ü¦sÀÉÃþ«¬¬°".CSV"
°õ¦æµ{¦¡®É´NºâÀɮ׫᭱¬O".XLS" §À, ³£·|§ó§ï¤F".CSV"

TOP

¦^´_ 4# GBKEE


    ¤£¦n·N«ä¯à½Ð°Ý
¢Ï¬O­ìÀɮסA¦b³o¢ÏÀɮפ¤°õ¦æ¡y¥t¦s·sÀÉ¡z¡A²£¥Í¢ÐÀɮסD¡D¥H¦¹Ãþ±À¡D¡D
­n°Ýªº°ÝÃD¬O¡G¦b¢ÏÀÉ®×¥t¦s·sÀÉ«á(²£¥Í¢±ÀÉ®×)¡A¯à°±¯d¦b¢ÏÀɮ׶ܡH¡]¦]¨C¦¸¡y¥t¦s·sÀÉ¡z«á¡A¤u§@§¡°±¯d¦b¨C¦¸²£¥Í·sÀɮס^­n¦p¦ó°±¯d¦b¢Ïªº­ìÀɮשO¡H¡H

TOP

¦^´_ 8# sillykin
  1. SaveCopyAs ¤èªk  ±N«ü©w¬¡­¶Ã¯ªº³Æ¥÷Àx¦s¨ìÀɮסA¦ý¤£Åܧó°O¾ÐÅ餤¤w¶}±Òªº¬¡­¶Ã¯¡C
½Æ»s¥N½X
  1. Sub Ex()
  2.     With ThisWorkbook
  3.        .SaveCopyAs .Path & "\test.xls"   '
  4.     End With
  5. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

Dim xPath As String
Dim Arr As Variant

Arr = Array("¥Ó½Ð®Ñ", "«´¬ù®Ñ")
Sheets(Arr).Copy

ActiveWorkbook.SaveCopyAs Filename:= _
      "C:\" & TextBox1 & "(" & (Year(Date) & Month(Date)) & Day(Date) & ")" & "(" & TextBox2 & ")" & ".xlsm"
ActiveWorkbook.Close


       Unload Me
·Q½Ð°Ý¬°¦ó°õ¦æ¤W­zµ{¦¡¡A¬°¥t¦s¤G­Ósheet ,¨Ã¦s¬°¤@­Ó·sÀÉ¡A¦ý·|¦h¥X¤@­Ó·sªºÀɮסA¤p§Ì¬O§_¦³¦a¤è¥Î¿ù©O¡H¡H¡H¡H

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD