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

¨Ì·í¤U°õ¦æ®É¶¡¡A¦p¦ó¦Û°Ê±N«ü©w¤u§@ªí¦WºÙ­×§ï¦¨¦¹®æ¦¡"1018-¤W¤È"???

¨Ì·í¤U°õ¦æ®É¶¡¡A¦p¦ó¦Û°Ê±N«ü©w¤u§@ªí¦WºÙ­×§ï¦¨¦¹®æ¦¡"1018-¤W¤È"???

­ì¤u§@ªí¦WºÙ¦p·Q¨Ì·í¤Ñ¤é´Á¤W¤U¤È¦UÀx¦s¦p"1018-¤W¤È",©Î"1018-¤U¤È"¦WºÙ®É¡A½Ð°Ý¦p¦ó¥i¥H¥¨¶°¦Û°Ê°õ¦æ¹F¦¨???

¦^´_ 1# p6703


¤u§@ªí¬O°õ¦æ«á·s¥[¤W?
²Ä¤@¬q¬O¦P®É¥[¤W  "¤W¤È","¤U¤È" ¨â¥÷.
²Ä¤G¬q¬O«ö·í¹B¦æ®É®É¶¡¥[¤W
  1. Sub ampm()
  2.     Worksheets.Add
  3.     ActiveSheet.Name = Format(Now(), "MM-DD") & "-¤W¤È"
  4.     Worksheets.Add
  5.     ActiveSheet.Name = Format(Now(), "MM-DD") & "-¤U¤È"
  6. End Sub

  7. Sub bytime()
  8.     Worksheets.Add
  9.     ActiveSheet.Name = Format(Now(), "MM-DD") & "-" & IIf(Hour(Now()) >= 12, "¤U¤È", "¤W¤È")
  10. End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

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

TOP

¦^´_ 1# p6703
  1. Sub Ex()
  2.     ActiveSheet.Name = Format(Now(), "mmdd") & "-" & Mid(Format(Time(), "C"), 1, 2)
  3. End Sub
½Æ»s¥N½X

TOP

·PÁ¤G¦ìª©¥Dªº«ü¾É,¤p§Ì°õ¦æ¤w¥i²Å¦X»Ý¨D,¦ý¤S¦³¤@©µ¦ù°ÝÃD½Ð±Ð

¦]­ì°õ¦æ®É¤w²£¥Í¤@­Ó1018-¤U¤Èªº¤u§@ªí,·í¦A¦¸°õ¦æ®É§Y¨q¥X¿ù»~(­ì¤u§@ªí¤w¦³¸Ó¦WºÙ)

¬O§_¥i±N¦A¦¸°õ¦æ²£¥Íªº¤u§@ªí¦WºÙ¨Ì§Ç¼W¥[®æ¦¡¬°:1018-¤U¤È(2),1018-¤U¤È(3)....

¦A¦¸·PÁª©¥Dªº±Ð¾É,ÁÂÁÂ...^^

TOP

¦^´_ 4# p6703
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub EX()
  3.     Dim xlName As String, Sh As Worksheet, i As Integer
  4.     xlName = Format(Now(), "mmdd") & "-" & Mid(Format(Time(), "C"), 1, 2)
  5.     On Error GoTo R:
  6.     With Sheets.Add(, Sheets(Sheets.Count))
  7.         ActiveSheet.Name = xlName
  8.     End With
  9. R:
  10.     If Err.Number <> 0 Then
  11.         For Each Sh In Sheets
  12.             If InStr(Sh.Name, xlName) Then i = i + 1
  13.         Next
  14.         xlName = xlName & "(" & i & ")"
  15.         Err.Clear
  16.         Resume
  17.     End If
  18. End Sub
½Æ»s¥N½X

TOP

·PÁÂGBKEE ª©¥D¡A­×§ïªº½T¥i¦p¤p§Ì§iª¾ªº¨Ì§Ç±N¦P®É¬qªº¤u§@ªí¦Û°Ê§Ç¸¹¼W¥[

¦ý¥i¯à¦³ÂI»~·|¤p§Ìªº·N«ä¤F¡A¤p§Ì¦A»¡©ú¤@¤U
§Ú«ü©wªº¤u§@ªí¬O¥H¨ä¥Lªº¥¨¶°°õ¦æ²£¥Íªº¡A¥i¯à´NÃþ¦ü¤@­Ó"·s­q³æ"¤u§@ªí¡A§Æ±æ°õ¦æ²{½Ð±Ðªº¥¨¶°«á¡A§Y¥i±N¸Ó¤u§@ªí¦WºÙ¦Û°ÊÅܧó¦¨1018-¤U¤È§Î¦¡¡A¦ý·í¤Ñ¥i¯à¤S·|¦A­«·s¶]¤@¦¸¡A¤S¦A²£¥Í¤@¦¸·s­q³æ¤u§@ªí¡A¦p¦A«ö¥¨¶°°õ¦æ®É¡A¦WºÙ§YÅܦ¨1018-¤U¤È(1)¡]²{°õ¦æ¥¨¶°®É¬O­ì¤u§@ªí¤´¦s¦b¡^

TOP

¦^´_ 6# p6703
©Ò¥H­n»¡©ú¥Õªº
  1. Option Explicit
  2. Sub ·s­q³æ()
  3.     Dim xlName As String, Sh As Worksheet
  4.     Dim Msg As Boolean
  5.     xlName = Format(Now(), "mmdd") & "-" & Mid(Format(Time(), "C"), 1, 2)
  6.     For Each Sh In Sheets
  7.         If InStr(Sh.Name, xlName) Then Msg = True: Exit For
  8.     Next
  9.     If Msg = False Then   '¨S¤ñ¹ï¨ì
  10.         Sheets.Add(, Sheets(Sheets.Count)).Name = xlName
  11.     Else
  12.         With Sh           '¤ñ¹ï¨ì
  13.             If Mid(.Name, 9) = "" Then   '©|¥¼¦³()
  14.             .Name = .Name & "(1)"
  15.             Else                         '¤w¦³()
  16.                 .Name = xlName & "(" & Val(Mid(.Name, 9)) + 1 & ")"
  17.             End If
  18.         End With
  19.     End If
  20. End Sub
½Æ»s¥N½X

TOP

·PÁÂGBKEE ª©¥D¥ß§Yªº¦^ÂСA¦ý¤p§Ìªí¹F¹ê¦b¤£¨Î¡A¤SÅýGBKEEª©¥D»~·|
§Ú·Q­nªº¬O·í²Ä¤@¦¸°õ¦æ¥¨¶°®É¡A·s­q³æ¤u§@ªí--->1018-¤U¤È
·í¤Ñ¥i¯à·|¦A¦³¤@¦¸·s¤u³æ¤u§@ªí¡A·í¦A¦¸°õ¦æ®É¡A­ì1018-¤U¤Èªº¤u§@ªí¤´¦b¡A¼W¥[¤F·s¤u§@ªí1018-¤U¤È(2)
¥H¦¹±ÀÃþ¡A¤]´N¬O¦pªG§Ú·í¤Ñ°õ¦æ¤T¦¸¥¨¶°¡A´N·|²£¥Í¤T­Ó¤u§@ªí
==>1018-¤U¤È¡A1018-¤U¤È(2)¡A1018-¤U¤È(3)

TOP

¦^´_ 8# p6703
¦A¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub ·s­q³æ()
  3.     Dim xlName As String, Sh As Worksheet
  4.     Dim xMsg As Integer
  5.     xlName = Format(Now(), "mmdd") & "-" & Mid(Format(Time(), "C"), 1, 2)
  6.     For Each Sh In Sheets
  7.         If InStr(Sh.Name, xlName) Then xMsg = xMsg + 1
  8.     Next
  9.     Sheets.Add(, Sheets(Sheets.Count)).Name = xlName & IIf(xMsg > 0, "(" & xMsg & ")", "")
  10. End Sub
½Æ»s¥N½X

TOP

·PÁÂGBKEEª©¥D¥i¥H¤F^^..¤£¹L¤p§Ì¦b®a´ú¸Õ®É¶]¥Xªº®æ¦¡³ºµM¬O1019-23(-->¦¹Åܦ¨®É¶¡)¡A§Ú¦b¤½¥q¶]ªº®É­Ô³£¬O¤W¤U¤Èªº¡D¡D«Ý¶g¤@¦A¨ì¤½¥q¸Õ¸Õ^^¦A¦¸»¡ÁnÁÂÁ°Õ^^

TOP

        ÀR«ä¦Û¦b : §Ú­Ì³Ì¤jªº¼Ä¤H¤£¬O§O¤H¡D¥i¯à¬O¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD