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

[µo°Ý] (µo°Ý)¡¹³s§Rn­Ó¤u§@ªí½d¨Ò°ÝÃD

[µo°Ý] (µo°Ý)¡¹³s§Rn­Ó¤u§@ªí½d¨Ò°ÝÃD

­è¾Çvba¡A¸ê¾ú©|²L¡A°Ý¤@¨ÇÄø°ÝÃDÁٽШ£½Ì¡A¤£¹L«ùÄò¦³¦bºë¶i¡C°ÝÃD¦p¤U¡G

²{¦b­n§R¤u§@ªí±q²Ä2­Ó§R¨ì²Ä12­Ó¡A§Ú¼gªºµ{¦¡¤£ª¾¹D¿ù¦b­þ¸Ì¡A·Ð½Ð¤j®a«ü¥¿¡C

Sub ¥¨¶°1()
' ¥¨¶°1 ¥¨¶°
Dim i As Long
For i = 2To 12
    Sheets("¤u§@ªíi").Select   <<<³o¦æÅã¥Ü¥X¿ù»~
    ActiveWindow.SelectedSheets.Delete
Next i
End Sub
---------------------------------------------------------------------------------------------------------
¸Ñ¨M¤è®×¡G(­ì©l·d¯ºªºª©¥»)
'
    Sheets("¤u§@ªí4").Select
    ActiveWindow.SelectedSheets.Delete
    Sheets("¤u§@ªí5").Select
    ActiveWindow.SelectedSheets.Delete
    Sheets("¤u§@ªí6").Select
    ActiveWindow.SelectedSheets.Delete
¡D¡D
¡D¡D
    Sheets("¤u§@ªí12").Select   '´N¦P¼Ëªºµ{¦¡½X¤@ª½½Æ»s¶K¤W¡A§ï¤u§@ªí«á­±ªº¼Æ¦r
    ActiveWindow.SelectedSheets.Delete
End Sub
-----------------------------------------------------------------------
¤µ¤Ñ¬O¹B®ð¦n¥u¦³12­Ó¤u§@ªí¡A­þ¤@¤Ñ¦pªG100­Ó¤u§@ªí­n§R¡A³o­Óµ{¦¡½X´NÅܪº«D±`ªø¤F¡D¡D°ò©ó¦M¾÷·NÃÑ¡A¯S¨Óª©¤W½Ð¯q¡C

¤§«e¾Ç²ß¬O¥H¿ý»s¥¨¶°¦A¥h½s¿è¸ÌÀY¬Ýµ{¦¡½X¡A·f°t´X¥»¤J¾Ç®ÑÄy¡A¦ý³B²z¤j¶q¸ê®Æ¤§«á¡A«Ü¦hªF¦è¶}©l¤£¯à¥Î¿ýªº¦^¥h¬Ý¡A¹³¤W¤@½g"¡¹½Ð±Ð¦U¦ì vba¾ã²z¼Æ¾Ú°ÝÃD¡A®Ú¾Ú±ø¥ó¡A¶}¯S©w·sÀÉ¡A¶KÀÉ¡AÀx¦s¡A¦A±ø¥ó§PÂ_ªº°ÝÃD"´N¨S¦³¿ëªk¥Î¿ý»sªº¤è¦¡¨Ó¤Ï¬d¡AÁÙ¦nGBKEE¤jÀ°¦£¡A°ÝÃD¤~±o¥H¸Ñ¨M¡A¤~µoı¦Û¤wªºµ{¦¡¾Ç²ß¤§¸ôÁÙ¦³«Ü»·ªº¸ô­n¨«¡C

¦]¬°¦b®Ñ§½¬Ý¤F¤£¤Ö¥é¶¡¤é¥»¤H¼gªº®ÑÀ³¥Î³£¼gªº¤£¿ù¡A¦ý¤ñ¸û¤Ö°w¹ï°j°é©Î¤j¶q¸ê®Æ°µ³B²zªº½d¨Ò¨Ó°µ¦U­Ó¸ÑªR¡C®t¤£¦h¤@­Ó³¹¸`¡A¦³¤j¤j¯à²{¨­»¡ªk¡A¾Ç²ßªº¹Lµ{¶Ü¡H¦A¨ÓÀ³¸Ó¬O­n§â°j°é¥]°j°éµ¥§Þ¥©¾Çªº«Ü¼ô½m¡C

¥»©«³Ì«á¥Ñ kobo ©ó 2012-1-4 19:55 ½s¿è

¸Õ¸Õ¬Ý³o­Ó
Sub ¥¨¶°1()
Dim i As Integer
For i = 12 To 2 Step -1
    Application.DisplayAlerts = False
    Sheets(i).Delete
    Application.DisplayAlerts = True
Next i
End Sub
©Î
Sub ¥¨¶°2()
Dim i As Integer
For i = 1 To 11
    Application.DisplayAlerts = False
    Sheets(2).Delete
    Application.DisplayAlerts = True
Next i
End Sub
©Î
Sub ¥¨¶°3()
Dim i As Integer
For i = 1 To 11
    a = Sheets.Count
    Application.DisplayAlerts = False
    Sheets(a).Delete
    Application.DisplayAlerts = True
Next i
End Sub

TOP

·PÁÂkobo¤j¡Aµ{¦¡½X¥i¥H°õ¦æ¡A§Ú¥[¤Fµù¸Ñ¡AÅý«á­±¾Ç²ßªº¤H¯à°÷¤F¸Ñ¡C

Sub ¥¨¶°1()
Dim i As Integer
For i = 12 To 2 Step -1 '±q12´î¨ì2¡A¨C¦¸¶¡¹j1
     Application.DisplayAlerts = False  '°±¤î¨t²Î´£¥Ü<³o¨â©Û¬Q¤ÑGBKEE¤j±Ð§Úªº
     Sheets(i).Delete '±q¤u§@ªí12¶}©l§R¨ì¤u§@ªí2
     Application.DisplayAlerts = True '«ì½Æ¨t²Î´£¥Ü
Next i
End Sub

TOP

¦^´_ 3# yagami12th
§Ú¤]¨Ó´£¨Ñ¤@­Ó¡A¦Û°Ê§P§O¦³´X­Ósheet¡A§R°£¨ì¥u³Ñ1­Ó¡A¦]¬°¦pªG³s³Ì«á¤@­Ó¤]§R°£¡AÀÉ®×·|Ãö³¬°_¨Ó
Sub DeleteSheets()
Dim SheetsCount As Integer
SheetsCount = Application.Sheets.Count
Application.DisplayAlerts = False
If SheetsCount > 1 Then
    For i = 1 To SheetsCount - 1
        Sheets(1).Delete
    Next i
End If
Application.DisplayAlerts = True
End Sub

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-1-5 11:15 ½s¿è

¦^´_ 4# lcc_seven
§R°£¨ì¥u³Ñ1­Ó¡A¦]¬°¦pªG³s³Ì«á¤@­Ó¤]§R°£¡AÀÉ®×·|Ãö³¬°_¨Ó
½Ð°Ý ¤@¤U  2007¥H¤Wª©¥»¤¹³\¬¡­¶Ã¯¤¤§¹¥þ¨S¦³ Sheet (¤u§@ªí) ¶Ü?
****************
«áÄò :
If SheetsCount > 1 Then            
    For i = 1 To SheetsCount - 1
        Sheets(1).Delete      <- §R°£²Ä¤@­Ó ¦ý¦p¬O Sheets(i).Delete ·|¦³¿ù»~  ¥i°Ñ¦Ò3#ªº Step-1
    Next i
End If
******************************

TOP

¦^¼i¡GGBKEE¤j¡A­è­è§Ú¦³¸Õ¤F¡A2010ª©¥»¦Ü¤Ö­n¯d¤@­Ó¤u§@ªí¤~¦æ¡A¤£¯à¥þ§R¡C

TOP

        ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD