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

[µo°Ý] ¦p¦ó¨q¥X©Ò¦³¥i¨£¤§sheet name?

[µo°Ý] ¦p¦ó¨q¥X©Ò¦³¥i¨£¤§sheet name?

¦p¦ó¨q¥X©Ò¦³¥i¨£¤§sheet name¦Ü¤@­Ó·sªºsheet¤Wªí¦C? (¥Hvba¤]¥i)
§Ú¥ÎExcel 2007
ÁÂÁÂ!
Symis

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-3-12 17:10 ½s¿è

¦^´_ 1# symis
  1. Option Explicit
  2. Sub EX()
  3.     Dim Sh As Worksheet, M As Variant
  4.     For Each Sh In Sheets
  5.         M = IIf(M <> "", M & "," & Sh.Name, Sh.Name)
  6.     Next
  7.     M = Split(M, ",")
  8.     Sheets(1).[A1].Resize(, UBound(M) + 1) = M  '¾î¦V±Æ¦C
  9.     ' Sheet(1) ²Ä¤@­Ó¤u§@ªí
  10.    ' Sheet(1).[A1].Resize(UBound(M) + 1) = Application.Transpose(M)  'ª½¦V±Æ¦C
  11.    ' With Sheets.Add             '·s¼Wªº¤u§@ªí
  12.    '    .[A1].Resize(, UBound(M) + 1) = M  '¾î¦V±Æ¦C
  13.    '    .[A1].Resize(UBound(M) + 1) = Application.Transpose(M)  'ª½¦V±Æ¦C
  14.    'End With
  15. End Sub
½Æ»s¥N½X

TOP

¤£¦n·N«ä,¶}¤@­Ó·sÀÉ,°õ¦æ±zªº¥¨¶°,°±¦bSheet(1)ªº¦a¤è,¥X²{error: ¨S¦³©w¸q³o­ÓSub©ÎFunction
·PÁ«ü±Ð!
Symis

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-3-12 15:59 ½s¿è

¦^´_ 3# symis
¶Ç¤W§Aªºµ{¦¡½X ¬Ý¬Ý

TOP

§Ú¬O¥Î§Aªºµ{¦¡½X§r!
¹Ï:
Symis

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-3-12 17:19 ½s¿è

¦^´_ 5# symis
¤£¦n·N«ä(¦Ñªá²´),®ö¶O§Aªº®É¶¡: ¤Ö¤Fs 2#µ{¦¡½X¤w­×¥¿.
    Sheets(1).[A1].Resize(, UBound(M) + 1) = M  '¾î¦V±Æ¦C
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

OK¤F,·PÁ±z
¥u¬O¬Ý¤£À´³Ì«á¤@¦æµ{¦¡,¬O¦p¦ó²£¥Íµ²ªGªº?
§Ú¸Õ¼g¤ñ¸û²Lªº»yªk¦p¤U:
    Columns(1).Insert
    For i = 1 To Sheets.Count
        Cells(i, 1).Value = Sheets(i).Name
        If Sheets(i).Visible = False Then Cells(i, 2).Value = "Hidden"
    Next i
Symis

TOP

¦^´_ 7# symis
M = Split(M, ",")
Sheets(1).[A1].Resize(, UBound(M) + 1) = M  '¾î¦V±Æ¦C
VBAªº»¡©ú¤¤¬d¬Ý¥i¤F¸Ñ.
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD