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

[µo°Ý] ¥Î°j°é§PÂ_sheet¦WºÙ¬O§_¬Û¦P¡A¨Ã½Æ»s(¤w¸Ñ¨M~·PÁ¦U¦ì)

[µo°Ý] ¥Î°j°é§PÂ_sheet¦WºÙ¬O§_¬Û¦P¡A¨Ã½Æ»s(¤w¸Ñ¨M~·PÁ¦U¦ì)

¥»©«³Ì«á¥Ñ iceandy6150 ©ó 2012-2-22 21:54 ½s¿è

§Ú¦³¨â­Ósheet¡A¤@­Ó¬O<¥\¯à>¡A¥t¤@­Ó¬O<1>
<1>¸Ì­±¦³³]©w«ö¶s¡A¯à²Î­p¸Ì­±ªº¸ê®Æ¡A§Ú­n·í¼Ë¥»
<¥\¯à>¸Ì­±§Ú³]¤F¤@­Ótextbox¥i¥H¿é¤J¼Æ¶q¡AÁÙ¦³«ö¶s¡A«ö¤F·|¦Û°Ê½Æ»s¸Ó¼Æ¶qªºsheet¥[¦b<1>«á­±
               ¦Ó¥B¦WºÙ¦Û°Ê¼W¥[<2>¡A<3>¡A<4>¡A......
¥i¬O¼g¤£¤Ó¥X¨Ó¡A¨D§UªO¤W¤j¤j

Private Sub CommandButton1_Click()
    Dim E          '³o¬O¬Ý§O¤H¼gªº
    Dim a, b As String
    Dim c As Integer
b = textbox1.text   '§ì¼Æ¶q¹L¨Ó¡A©Ò¥H§âb©w¸qString

For a = 2 To b
      
    For Each E In Sheets
            If   E.Name = a   Then          '§PÂ_¥Ø«eÀɮפ¤©Ò¦³sheet¬O§_¦P¦W
              MsgBox (a + "­«ÂФF")
              c = 1
              Exit For
            Else
              c = 0
             MsgBox (a+"¥¼­«ÂÐ¥i·s¼W")
             Exit For
           End If
        Next
   
     If c = 0 Then
     Worksheets(a - 1).Copy after:=Worksheets(a - 1)
     ActiveSheet.Name = a
     End If
Next
End Sub

§Æ±æ¥Ø¼Ð¬Oa=2§PÂ_¤@¦¸¡Aa=3§PÂ_¤@¦¸.......¡C¤@¶}©l¥u¦³<1>«Ü¦n·s¼W
¦ý­Y§â¼Æ¶q±q5§ï8¡A¦A«ö¤@¦¸¡A·Ó²z»¡<1><2><3><4><5>·|Åã¥Ü­«ÂФF¡A¥u·s¼W<6><7><8>
¤£¹L¦n¹³¶]¤£¥X¨Ó¡A°j°é¦n¹³¤]°j¤F¦n´X¦¸ @_@"
«¢Åo~¤j®a¦n§r

¦^´_ 1# iceandy6150


Private Sub CommandButton1_Click()
If TextBox1 <> "" Then
For i = 1 To Val(TextBox1)
   With Sheets.Add(after:=Sheets(Sheets.Count))
   .Name = CStr(Sheets.Count)
   End With
Next
End If
End Sub
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_  iceandy6150


Private Sub CommandButton1_Click()
If TextBox1  "" Then
For i = 1 To Val(T ...
Hsieh µoªí©ó 2012-2-16 23:44


¤j¤j¡A§Aªº¤èªk¥i¥H·s¼W.....¿é¤Jªº¼Æ¶qªºsheet
¥i¬O§Ú­n¥H<1>³o­Ósheet¬°¼Ë¥»¡A©Ò¦³·s¼Wªº³£¬O½Æ»s<1>
¥t¥~¬O¨¾§b¥\¯à
¨Ò¦p²Ä¤@¦¸¿é¤J5 ----> µ{¦¡·s¼W <2><3><4><5>  (1­ì¥»´N¦³)
¦ý«á¨Óı±o5­Ó¤£°÷¥Î¡A©ó¬O¿é¤J8--->µ{¦¡§PÂ_1~5¤w¸g¦³¤F¡A¤£·s¼W¡C6~8·s¼W
(³o¼Ë1~5¤ºªº¸ê®Æ¤£·|³Q°Ê¨ì)

ÁÂÁÂ
«¢Åo~¤j®a¦n§r

TOP

¦^´_ 3# iceandy6150
  1. Private Sub CommandButton1_Click()
  2. Application.ScreenUpdating = False
  3. If TextBox1 <> "" Then
  4. For i = 1 To Val(TextBox1) - Sheets.Count
  5.    Sheets(1).Copy after:=Sheets(Sheets.Count)
  6.    ActiveSheet.Name = CStr(Sheets.Count)
  7. Next
  8. End If
  9. Application.ScreenUpdating = True
  10. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh


    «z~¤Ó¯«©_¤F§a
ÁöµM§Ú¬Ý¤£¤ÓÀ´¤°»ò·N«ä
¦ý¬O¶K¤Wµ{¦¡«á´ú¸Õ
ok­C~~~
¤Ó·PÁ§A¤F~~:loveliness:

§Úª¾¹Dªº¨ç¼Æ¤Ó¤Ö¤F¡A«D±`®zªº·s¤â¤@­Ó:'(
«¢Åo~¤j®a¦n§r

TOP

¦^´_  iceandy6150
Hsieh µoªí©ó 2012-2-17 00:10



    ¶W¯Åª©¥D¤£¦n·N«ä
¤µ¤Ñ´ú¸Õµo²{¤@¨Ç¤p°ÝÃD
¥Îsheet.count¬O¥i¥Hºâ¥Xsheetªº¼Æ¥Ø
¦ý¬O§Ú¥i¯à¦³<¥\¯à><©R¥O>µ¥sheet¦s¦b
¨Ò¦p§Ú²{¦³ªºsheet¬O <¥\¯à><´ú¸Õ><©R¥O><1>
¦pªGtextbox¿é¤J4¡A¨º»ò±N¤£·|°Ê§@¡A¦]¬°sheet¼Æ¶q¦³4­Ó¤F
¿é¤J5¡A·|Åܦ¨<¥\¯à><´ú¸Õ><©R¥O><1><5>

¥Ø¼Ð¬O¨C¦¸®Ö¹ï¥Ø«e©Ò¦³sheetªº¦WºÙ¬O§_¦³¬Û¦Pªº
­Y¦³«h¤£·s¼W¡A­YµL¤~·s¼W
¦Ó¥B·s¼W®É¥u·s¼W¯Â¼Æ¦r¦WºÙªºsheet
¤£·|§â¨ä¥L«D¼Æ¦r¦WºÙªºsheetºâ¤J

ÁÂÁÂ
«¢Åo~¤j®a¦n§r

TOP

¦^´_ 6# iceandy6150
  1. Option Explicit
  2. Sub Ex()
  3.     Dim xSH As Integer, Sh As Worksheet, xi As Integer, A As Integer
  4.     A = 6
  5.     For Each Sh In Sheets
  6.         If IsNumeric(Sh.Name) Then xSH = xSH + 1
  7.     Next
  8.     For xi = xSH + 1 To A
  9.         Sheets("1").Copy , Sheets(Sheets.Count)
  10.         Sheets(Sheets.Count).Name = xi
  11.     Next
  12. End Sub
½Æ»s¥N½X

TOP

¦^´_ 7# GBKEE


    ¤j¤j½Ð°Ý¤@¤U
§Aªºµ{¦¡­n«ç»ò©ñ?
§Ú³o¼Ë©ñ¦n¹³¤£¯à°Ê... (§Ú©ñ¦b«ö¶s¸Ì­±)
Private Sub CommandButton2_Click()
Option Explicit
Sub Ex()
    Dim xSH As Integer, Sh As Worksheet, xi As Integer, A As Integer
    A = 6
    For Each Sh In Sheets
        If IsNumeric(Sh.Name) Then xSH = xSH + 1
    Next
    For xi = xSH + 1 To A
        Sheets("1").Copy , Sheets(Sheets.Count)
        Sheets(Sheets.Count).Name = xi
    Next
End Sub
End Sub
«¢Åo~¤j®a¦n§r

TOP

ª©¥D¤j¤j~~§Ú­×§ï¤F¤@¤U¡A¥i¥H¥Î¤F­C
¦n´Îªü!!!!
Private Sub CommandButton2_Click()
   
    Dim xSH As Integer, Sh As Worksheet, xi As Integer, A As Integer
    A = Val(TextBox1)
    For Each Sh In Sheets
        If IsNumeric(Sh.Name) Then xSH = xSH + 1
    Next
    For xi = xSH + 1 To A
        Sheets("1").Copy , Sheets(Sheets.Count)
        Sheets(Sheets.Count).Name = xi
    Next

End Sub

·PÁ¦A·PÁÂ~~
«¢Åo~¤j®a¦n§r

TOP

¼Ó¥D~
G¤j¤j©ÎH¤j¤j³£¬O«Ü¼F®`ªº°ª¤â~

¦ý¯¸¦bSAªº¨¤«×~ ¨ä¹êÁÙ¬O·|¦³¤@©wªºBUG¦s¦b
G¤j¤jªºµ{¦¡½X~ ·ísheet.Name ¤£¬O¥X²{ªº³sÄò¸¹½X~ ·|²£¥Í¿ù»~
¦p textbox1.text=6 °õ¦æ«á~
¦AÀH«K¬å±¼«Dsheet.name=6ªº¥ô¦ó¤@±isheet~ ¦A­«·s°õ¦æ®É~ ´N·|²£¥Íbug

­Y¤£¦Ò¶q¤w¦³ªºsheet¬O»Ý­n³Q«O¯dªº~ «Øij«O¯d°ò¥»ªºsheet~ ¨ä¥L1,2,3...sheet «Øij§R°£«á~
¦A­«·s¶]¥X¨Ó~
¨Ò.¨C¤@¦¸sheet1¶]¥Xªº¸ê®Æ,³£¤@¼Ë~ ´N¥i¥H¥Î¦¹¤è¦¡
¨Ò.²Ä¤@¦¸¶]¥Xsheet1ªº¸ê®Æ»P²Ä¤G¦¸¶]¥X¨Óªºsheet1¤£¤@¼Ë®É~ ´N¤£¯à³o¼Ëªº¤è¦¡~

¼Ó¥D~  ´£¨Ñ³o¨Ç«Øij¬O¦]¬°¦³®É¨Ï¥ÎªÌ¤£¬O¦Û¤v®É~ ·|²£¥Í¤£¦Pªº¥i¯à©Ê~
¦b³]­p®É~ ¯àºÉ¶q¦Ò¶qªº§¹¾ã~ ¤Îµ²¦X¤@¨Ç¹w¨¾¥i¯àµo¥Íªº¦]¯À~
·|Åý§A³]­p¥X¨Óªº¤u¨ã¯à°÷¯u¥¿ªº³Q¨Ï¥Î~
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD