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

[µo°Ý] ¦p¦ó¨ÏEXCELÀɮסA¨C¤Ñ²Ä¤@¦¸¥´¶}®É¡A¥Î·í¤Ñ¤é´Á¦Û°Ê·s¼W¤@­Ó¤u§@ªí

[µo°Ý] ¦p¦ó¨ÏEXCELÀɮסA¨C¤Ñ²Ä¤@¦¸¥´¶}®É¡A¥Î·í¤Ñ¤é´Á¦Û°Ê·s¼W¤@­Ó¤u§@ªí

¦p¦ó¨ÏEXCELÀɮסA¨C¤Ñ²Ä¤@¦¸¥´¶}®É¡A¥Î·í¤Ñ¤é´Á¦Û°Ê·s¼W¤@­Ó¤u§@ªí
°²³]¤µ¤Ñ¬O2017¦~12¤ë8¸¹¬P´Á¤­¡A·íEXCEL²Ä¤@¦¸¥´¶}®É¡A¥Î·í¤Ñ¤é´Á§@¬°¦WºÙ(20171208)¡A·s¼W¤@­Ó¤u§@ªí¡C
¦pªG¤µ¤Ñ¬O¬P´Á¤»¸ò¬P´Á¤é´N¤£·s¼W¡A²Ä¤G¦¸¥´¶}®É¤]¤£·s¼W¡C
½Ð¦U¦ì°ª¤âÀ°¦£¤@¤U¡AÁÂÁ¡C

¦^´_ 1# paul3063

§@ªk¥i¯à»Ý­n¼gVBA

µ{¦¡½X¦p¤U
  1. Option Explicit

  2. Private Sub Workbook_Open()
  3.    
  4.     Dim i, flag As Integer
  5.    
  6.     flag = 0
  7.    
  8.     '§PÂ_¤u§@ªí¬O§_¦s¦b
  9.     For Each i In Worksheets
  10.         If i.Name = Application.Text(Now(), "yyyymmdd") Then
  11.             flag = 1
  12.             Exit For
  13.         End If
  14.     Next
  15.    
  16.     '­Y¤u§@ªí¤£¦s¦b §PÂ_¬O§_¬°¤»¤é (weekday ¬P´Á¤é=1 ¬P´Á¤»=7)
  17.     If Weekday(Now()) <> 7 And Weekday(Now()) <> 1 And flag = 0 Then
  18.         
  19.         Worksheets.Add.Name = Application.Text(Now(), "yyyymmdd")
  20.    
  21.     End If
  22.    
  23. End Sub
½Æ»s¥N½X
¹ê§@ªþ¥ó¦p¤U
AddWorksheet.zip (9.81 KB)
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_ 2# li_hsien

li_hsien¤j¡A
¦pªG­n¦h¼W¥[¤@­Ó·í¤Ñ¤é´Á«á­±¦h¤@­ÓAªº¤u§@ªí(¨Ò¦p20171212A)­n«ç¼Ë­×¸Óµ{¦¡½X?
¥i¤£¥i¥H¦A³Â·Ð±z¤@¤U

TOP

¦^´_ 4# paul3063


  ±N¨â­Ó Application.Text(Now(), "yyyymmdd") «á­±³£¥[¤W & "A"

TOP

¨S·Q¨ì excel ªº vba ³ºµM¦³³oºØ¥Îªk
¤Ó¹ê¥Î¤F

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD