ªð¦^¦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¦¨???

GBKEE ª©¥D¡A¤p§Ì«ö­ì4#´£¨Ñªºµ{¦¡¥¨¶°µy°µ­×§ï¡A¥i²Å¤p§Ìªº»Ý¨D¡A¦b¦¸¦A¦¸·PÁÂGBKEE ª©¥D¡AÁÂÁÂ....¡]­ì¥¨¶°À³¬O·s¼W¤u§@ªí¡A¦ý¤p§Ì»Ý¨Dªº¬O±N­ì¤u§@ªíÅܧó¦WºÙ¡A¥H«K¤§«á¦A·s¼W"¨C¤é·s­q³æ"¤u§@ªí®É¤£­P¿ù»~¡^
  1. Option Explicit
  2. Sub ¤w®Ö¹ïªº­q³æ¥iÂন¤é´Á¦WºÙ()
  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.     Sheets("¨C¤é·s­q³æ").Select
  7.     ActiveSheet.Name = xlName
  8. R:
  9.     If Err.Number <> 0 Then
  10.         For Each Sh In Sheets
  11.             If InStr(Sh.Name, xlName) Then i = i + 1
  12.         Next
  13.         xlName = xlName & "(" & i & ")"
  14.         Err.Clear
  15.         Resume
  16.     End If
  17. End Sub
½Æ»s¥N½X

TOP

¦^´_ 13# p6703
¬O³o¼Ë¶Ü?                  
7# µ{¦¡½X
  1. If Msg = False Then   '¨S¤ñ¹ï¨ì
  2.              MsgBox "§ä¤£¨ì " & xlName        
  3.            'µù¸Ñ Sheets.Add(, Sheets(Sheets.Count)).Name = xlName
  4.        Else
½Æ»s¥N½X

TOP

GBKEEª©¥D¡A®e¤p§Ì¦A¸ÑÄÀ
¤@¯ë¤@¤Ñ·|¤W¤U¤È¦U¥h®»¨ú¤@¦¸·s­q³æ
¤W¤È®»¨úªº·s­q³æ¤u§@ªí(¦¹§Ú¬O¤S¥t¥~¥Î¥¨¶°¥h®»¨úªº¡^¡A°õ¦æ¥¨¶°«á¡AÅܦ¨1023-¤W¤È¡]¦¹®É­ì·s­q³æ¤u§@ªí¤wÅܧ󦹦WºÙ¡^
¦ý¦³®É¤W¤È·|®»¨ú¤£¤î¤@¦¸¡A·í²Ä¤G¦¸®»¨ú·s­q³æ¤u§@ªí®É¡A°õ¦æ¥¨¶°®É¡AÀ³Åܦ¨¤F1023-¤W¤È(1¡^¡A¥H¦¹Ãþ±À.....

TOP

¦^´_ 11# p6703
²{¦b§Ú¤w§Ë¤£²M·¡¤F,§A°õ¦æ¤@¦¸«á­nªº¬O¤°»ò?
§A»¡: ·s­q³æ¤u§@ªí--->¤é´Á+¤W(¤U)¤È¤u§@ªí¡]¤u§@ªí¦WºÙÅܧó¡A«D·s¼W¤u§@ªí¡^
Q:¬¡­¶Ã¯¤¤:  ¤é´Á+¤W(¤U)¤È¤u§@ªí ¬O¨C¤Ñªº¤é´Á³£¦³¤@±i¶Ü?
ÁÙ¬O¬¡­¶Ã¯¤¤¤£ºÞ¬O¤é´Á¬°¦ó,³£¥u¦³ (·í¤é¤é´Á) ¤@±i ¤é´Á+¤W(¤U)¤È¤u§@ªí ?

TOP

GBKEEª©¥D¡A³o¤G¤Ñ°õ¦æµo²{¦³ÂI°ÝÃD¡A«ö¦¹¥¨¶°°õ¦æ¡AÁöµM¥i²£¥Í¤é´Á+¤W¤U¤È(§Ç¸¹)¤u§@ªí¡A¦ý¸Ó¤u§@ªí¤¤µL¥ô¦ó¸ê®Æ¡A¦Ó¥B¨C¤é·s­q³æ¤u§@ªí¤´¦b¡A¤p§Ì­ì¥H¬°¬O¦Û¤v±Nµ{¦¡½X¥[¤JÃö«Y³y¦¨¡A¦ý«á³æ¿W¥u¥Hª©¥D´£¨Ñªºµ{¦¡½X°õ¦æ®É¡A¤´¬O¦¹±¡ªp¡A½ÐGBKEEª©¥D¦A¨ó§U½T»{¡AÁÂÁÂ
­º¦¸°õ¦æ¥¨¶°¡G
·s­q³æ¤u§@ªí--->¤é´Á+¤W(¤U)¤È¤u§@ªí¡]¤u§@ªí¦WºÙÅܧó¡A«D·s¼W¤u§@ªí¡^
·í¤Ñ¦A¦¸°õ¦æ¥¨¶°¡]·í¤Ñ¥i¯à·|¦A®»¤@¦¸·s­q³æ¤u§@ªí¡^¡G
·s­q³æ¤u§@ªí--->¤é´Á+¤W(¤U)¤È(§Ç¸¹)¤u§@ªí¡]¤u§@ªí¦WºÙÅܧó¡A«D·s¼W¤u§@ªí¡^

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

¦^´_ 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¥ß§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

¦^´_ 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

        ÀR«ä¦Û¦b : ¤@­Ó¯Ê¤fªºªM¤l¡A¦pªG´«¤@­Ó¨¤«×¬Ý¥¦¡A¥¦¤´µM¬O¶êªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD