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

[µo°Ý] ·Q½Ð±Ð¦U¦ì«e½ú~¤@­ÓVBAªº°ÝÃD

[µo°Ý] ·Q½Ð±Ð¦U¦ì«e½ú~¤@­ÓVBAªº°ÝÃD

·Q½Ð°Ý¦pªG§Ú¨C¤Ñ³£·|§ó·s¤é´Á~¦p¦ó¼g¤~¯àÅýVBA¥¨¶°¥D°Ê§ì·sªº¤é´Á~¦Ó¤£»Ý­n¨C¤Ñ¤â°Ê¥h§ó·s~·PÁÂ^^

§A¨C¤Ñ³£¦b³Ì«e­±¼W¥[­¶­±ªº¸Ü,´N±N¬ÛÃö¤º®e³£´«¦¨sheets(1).

TOP

¦pªG §A¥u¬O·Q­n®³¤µ¤Ñ¤ë¥÷¤é´Á«Ø¥ß·s¤u§@ªíªº¸Ü
¤£¥é¸Õ¸Õ¬Ý§Úªº¥¨¶°
¤£¬O¦Ñ¤â ¦h¨£½Ì

Sub ¨ú±o¤µ¤Ñ¤ë¥÷¤é´Á«Ø¥ß¬°·s¤u§@ªí()
    ActiveWorkbook.Sheets.Add Before:=Worksheets(Worksheets.Count)
    i = ActiveSheet.Name
    Sheets(i).Name = Format(Now(), "mmdd")
End Sub

TOP

Try this:
  1. Sub zz()
  2. Dim md$, t As Boolean
  3. md = Format(Date, "mmdd")
  4. For i = 1 To Sheets.Count
  5.     If Sheets(i).Name = md Then t = True: Exit For
  6. Next
  7. If t Then
  8.     Sheets(md).Activate
  9. Else
  10.     Sheets.Add before:=Sheets(1)
  11.     ActiveSheet.Name = md
  12. End If
  13. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤Ñ¤W³Ì¬ü¬O¬P¬P¡A¤H¥Í³Ì¬ü¬O·Å±¡¡C
ªð¦^¦Cªí ¤W¤@¥DÃD