ªð¦^¦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 : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD