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

[µo°Ý] ¦p¦ó¯à¤@Áä½Æ»s¨Ã·s¼W¦h­¶¤u§@ªí?

[µo°Ý] ¦p¦ó¯à¤@Áä½Æ»s¨Ã·s¼W¦h­¶¤u§@ªí?

¤@Áä½Æ»s¨Ã·s¼W¤u§@ªí.rar (14.15 KB)




¦³³Ò¦U¦ì¤j¤j¸Ñµª¤F¡I3Q¡C

¦^´_ 1# RCRG
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim xDay As Date, i As Date, x As Date
  4.     On Error Resume Next
  5. AG:
  6.     Do
  7.     xDay = InputBox("¿é¤J¤é´Á", "¤u§@ªí¤é´Á", Date)
  8.     If Err > 0 Then Err.Clear: GoTo AG  ' ¤é´Á®æ¦¡¿ù»~:µ{¦¡²¾¨ì AG °õ¦æ
  9.     x = MsgBox("½T©w¤é´Á ¬°: " & Format(xDay, "Dddddd"), vbYesNoCancel, "¤u§@ªí¤é´Á")
  10.     If x = vbCancel Then Exit Sub           '¨ú®øÁä: Â÷¶}³oµ{¦¡
  11.     Loop Until x = vbYes                    '½T©wÁä: Â÷¶}³o°j°é
  12.     On Error GoTo Er
  13.     Application.DisplayAlerts = False
  14.     For i = xDay To xDay + 15 * 2 Step 4    '¶¡¹j4¤Ñ
  15.         For x = i To i + 1                  '³sÄò2¤Ñ
  16.             Sheets("­ì©lÀÉ").Copy after:=Sheets(Sheets.Count)
  17.             ActiveSheet.Name = Format(x, "Dddddd")  '¦³³o¤u§@ªí¤é´Áµ{¦¡©Î¦³¿ù»~
  18.         Next
  19.     Next
  20.     Application.DisplayAlerts = True
  21.     Exit Sub
  22. Er:  '³B¸Ì¤u§@©R¦Wªº¿ù»~
  23.     Sheets(Format(x, "Dddddd")).Delete
  24.     Resume  '¦^¨ì¿ù»~ªºµ{¦¡½X
  25. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE


    µª®×§¹¥þ¨S°ÝÃD¥i¥H¨Ï¥Î³á¡Iµ²ªG¤]§¹¥þ²Å¦X§Ú©Ò»Ý­nªº¡A¯uªº¬OÁÂÁÂGBKEE¤jªºÀ°¦£¤F¡I

TOP

Sub ·s¼W¤u§@ªí()
Dim X, j%, k%, SN, SH As Worksheet
Do
¡@¡@X = Application.InputBox("½Ð¿é¤J¤é´Á¡A¦p¡G2015/6/6 ©Î 2015-6-5")
¡@¡@If X & "" = "False" Then Exit Sub
¡@¡@If IsDate(X) Then Exit Do
¡@¡@MsgBox "¤é´Á¿ù»~©Î¥¼¿é¤J¡A½Ð­«·s¿é¤J¡ã¡ã"
Loop
¡@
Application.DisplayAlerts = False
For j = 0 To 8
For k = 0 To 1
¡@¡@SN = Format(DateValue(X) + j * 4 + k, "yyyy-m-d")¡@'¤u§@ªí¦WºÙ
¡@¡@On Error Resume Next
¡@¡@¡@¡@Set SH = Nothing: Set SH = Sheets(SN)¡@'Àˬd¤u§@ªí¬O§_¦s¦b
¡@¡@On Error GoTo 0
¡@¡@If SH Is Nothing Then¡@'­Y¤u§@ªí¤£¦s¦b¡A½Æ»s¤@­Ó­«©R¦W
¡@¡@¡@Sheets("­ì©lÀÉ").Copy after:=Sheets(Sheets.Count)
¡@¡@¡@ActiveSheet.Name = SN
¡@¡@End If
Next k
Next j
Sheets("½Æ»s·s¼W¤u§@ªí").Select
End Sub

'¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×
Sub §R°£¤u§@ªí()
Dim SH As Worksheet
Application.DisplayAlerts = False
For Each SH In Sheets
¡@¡@If IsDate(SH.Name) Then SH.Delete
Next
End Sub

TOP

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


    ­ã¤j¤]¥X©Û¤F¡IÁÙ¥t¥~ªþ°e¤F¤u§@ªí§R°£¡A¤]«D±`ÁÂÁ±zªºµª®×­ò¡I3Q

TOP

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


    ½Ð°Ý ­ã¤j ¡A"§R°£¤u§@ªí" ¯àÀ°§Ú¥ý¼u¥X¬O§_½T»{§R°£ªºµøµ¡¶Ü? ¤£µM©È¤â´Ý·|«ö¨ì»~§R...XD ¡AÁÂÁ¡I

TOP

¦^´_ 6# RCRG


If MsgBox("½T»{­n§R°£¤u§@ªí¶Ü¡H", 4 + 32 + 256) = vbNo Then Exit Sub

¡Õ°Ñ¼Æ¤@¡Ö
0¥uÅã¥Ü OK «ö¶s¡C
1Åã¥Ü OK ¤Î Cancel «ö¶s¡C
2Åã¥Ü Abort¡B Retry ¤Î Ignore «ö¶s¡C
3Åã¥Ü Yes¡BNo ¤Î Cancel «ö¶s¡C
4Åã¥Ü Yes ¤Î No «ö¶s¡C
5Åã¥Ü Retry ¤Î Cancel «ö¶s¡C
¡Õ°Ñ¼Æ¤G¡Ö
16Åã¥Ü Critical Message ¹Ï¥Ü¡C
32Åã¥Ü Warning Query ¹Ï¥Ü¡C
48Åã¥Ü Warning Message ¹Ï¥Ü¡C
64Åã¥Ü Information Message ¹Ï¥Ü¡C
¡Õ°Ñ¼Æ¤T¡Ö
0²Ä¤@­Ó«ö¶s¬O¹w³]­È¡C
256²Ä¤G­Ó«ö¶s ¬O¹w³]­È¡C
512²Ä¤T­Ó«ö¶s¬O¹w³]­È¡C
768²Ä¥|­Ó«ö¶s¬O¹w³]­È¡C

TOP

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


    ÁÂÁ­ã¤j¸Ô²Óªº»¡©ú»PÃC¦â°Ï¤À¡C

TOP

        ÀR«ä¦Û¦b : ¦h°µ¦h±o¡C¤Ö°µ¦h¥¢¡C
ªð¦^¦Cªí ¤W¤@¥DÃD