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

·Q½Ð±ÐÃö©ó©w¸qª«¥ó»yªkªººÃ°Ý¡H

·Q½Ð±ÐÃö©ó©w¸qª«¥ó»yªkªººÃ°Ý¡H

§Úª¾¹D¥Îset¥i¥H¥Î¨Ó©w¸qª«¥ó¡A¦ý§Ú¹ï©ó¤U¦C¨âºØ¼gªk¦³ÂIºÃ´b¡AÁٳ·Фj¤j­ÌÀ°§ÚÂç²M¤@¤U¡G
¥H¤Uªº¼gªk¬O¥i¥H·s«Ø¤@­Óexcel¤u§@ªí¡A¨Ã±N¥Ø«e©Ò¦³¦b¸Ó¤u§@ï¸Ìªº¤u§@ªí¦WºÙ¡A¥þ³¡©ñ¦b·s«Øªº¤u§@ªí¸Ì¡C

    Set newa = Sheets.Add(Type:=xlWorksheet)
    For i = 1 To Sheets.Count
    newa.Cells(i, 1).Value = Sheets(i).Name
    Next i
   
¦b³o¸Ì¡A§Ú¹ïsetªº¥Îªk¦³ºÃ°Ý´N¬O¡G¦pªG¤µ¤Ñ§âset®³±¼¡Aª½±µ§â²Ä¤T¦æªºnewa¨ú¥N±¼¡A³o¼Ëªº¼gªk¸ò§ânewa©w¸q¦¨ª«¥óªº·§©À¦³¦ó¤£¦P¡H
´N¬O§â²Ä¤T¦æÅܦ¨    Sheets.Add(Type:=xlWorksheet).Cells(i, 1).Value = Sheets(i).Name
µM«á²Ä¤@¦æ§R°£¡C

½Ð¦U¦ì¤j¤j«ü±Ð¡AÁÂÁ¡C

¦^´_ 1# tku0216
Sheets.Add   °õ¦æ¦¹µ{¦¡½X«á, §@¥Î¤¤ªº¤u§@ªí,¬°¦¹·s¼Wªº¤u§@ªí

Sheets.Add(Type:=xlWorksheet)
For i = 1 To Sheets.Count
    Cells(i, 1).Value = Sheets(i).Name  '¦¹Cells ¬°§@¥Î¤¤¤u§@ªí( ·s¼Wªº¤u§@ªí )ªº Cells   
Next i

Set  Sheets.Add(Type:=xlWorksheet).Cells(1, 1).Value = Sheets(1).Name
¤W¦¡µLªk¥[¤W Set ©w¸q¬°ª«¥ó

TOP

¥»©«³Ì«á¥Ñ tku0216 ©ó 2011-12-2 15:51 ½s¿è

¦^´_ 2# GBKEE


    ÁÂÁ¤j¤j¸Ñ»¡¡A¦ý¦³ÂI»~¸Ñ§Úªº·N«ä...
    §Úªº·N«ä¬O¡A§Ú¥i¥H§â²Ä¤@¦æsetªº«Å§i®³±¼¡AµM«áª½±µ¼g¦¨³Ì«á¤@¦æ¶Ü¡H
    ¤]´N¬O¡G
    Set newa = Sheets.Add(Type:=xlWorksheet)
    For i = 1 To Sheets.Count
    newa.Cells(i, 1).Value = Sheets(i).Name
    Next i

     ©Î¬O§ï¦¨¡G
     For i = 1 To Sheets.Count
     Sheets.Add(Type:=xlWorksheet).Cells(i, 1).Value = Sheets(i).Name
     Next i

     ¼gªk¦b·N¸q¤W¦³¦ó¤£¦P¡HÁÂÁ¡C

TOP

¦^´_ 3# tku0216
  1. Set newa = Sheets.Add(Type:=xlWorksheet)   'newa ÅÜ¼Æ «ü©w¬°¦¹·s¼W¤u§@ªíªºª«¥ó
  2.     For i = 1 To Sheets.Count
  3.     newa.Cells(i, 1).Value = Sheets(i).Name      'newa.Cells(i, 1).Value ->newaª«¥óªºCells(i, 1)
  4.     Next i
½Æ»s¥N½X
  1.      For i = 1 To Sheets.Count   
  2.      Sheets.Add(Type:=xlWorksheet).Cells(i, 1).Value = Sheets(i).Name   
  3.      '·s¼W¤u§@ªíªºCells(i, 1).Value = Sheets(i).Name   'Sheets.Count ¦³¦h¤Ö´N·s¼W´X­Ó¤u§@ªí
  4.      Next i
½Æ»s¥N½X

TOP

¦hÁ¤j¤j¤À¨É¡A©Ò¥H³o¼Ëªº¼gªk§Ú·Q®t´N®t¦b¤u§@ªí·|¦]¬°°j°é¨C¦¸¼W¥[¦Ó¼W¥[¡C

ÁÙ¦³ªþ±a¤@­Ó°ÝÃD¡G½Ð°Ýsheets¸òworksheetsªº¥Îªk®t¦b­þ¸Ì¡H
§Úª¾¹Dworkbooks¬O«ü¸ÓexcelÀɮתº©Ò¦³¤u§@ªí¡A¦ý¬O¦bVBA¸Ì¡A¬°¦ó¦³®É¥Îsheets¡A¦³®É«o¥Îworksheets¡H
¨Ò¦pGBKEE¤j¤j¤À¨É¾a¤Wªºµ{¦¡½X¤¤¡A²Ä¤@¦æ¸ò²Ä¤T¦æ´N¥Î¨ì¤£¦Pªº¼gªk¡H

TOP

¦^´_ 5# tku0216
¨S¦³°Ï§O
  1. Sub Ex()
  2.     For i = 1 To Worksheets.Count
  3.         MsgBox Worksheets(i).Name
  4.     Next
  5. End Sub
½Æ»s¥N½X

TOP

­Y¤u§@襤¥]¨ç¹Ïªí©Î4.0¥¨¶°¤u§@ªí¡A´N·|¦³°Ï§O¡C

TOP

ÁÂÁ¤j¤j­Ì¨ó§UÆ[©ÀÂç²M¡C

TOP

        ÀR«ä¦Û¦b : ­n¥Î¤ß¡A¤£­n¾Þ¤ß¡B·Ð¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD