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

½Ð±Ð for Each ..... Next ¥Îªk

½Ð±Ð for Each ..... Next ¥Îªk

¥»©«³Ì«á¥Ñ JOSH ©ó 2012-11-27 15:40 ½s¿è

Dear ¦U¦ì¤j¤j
½Ð°Ý¤U¦CVBA­n«ç»òÅý¥L°±¤î¦b³Ì«á¤@­ÓSheet¡A¤£·|¥X²{¿ù»~°T®§!!
§R¨ì³Ì«á¤@­Ósheet·|¥X²{µøµ¡¡y³Ì«á¤@­Ó¤u§@ªí¡z
ÁÂÁ«ü±Ð


'======================================
Sub Macro1()
Dim mysheet As Worksheet

For Each mysheet In Worksheets

Application.DisplayAlerts = False
mysheet.Delete
Application.DisplayAlerts = True

Next

End Sub

¦³°ÝÃD¦Aµo°Ý§a!@@
  1. Sub Macro1()
  2. [color=Red]On Error GoTo restart[/color]
  3. Dim mysheet As Worksheet

  4. For Each mysheet In Worksheets

  5. Application.DisplayAlerts = False
  6. mysheet.Delete
  7. Application.DisplayAlerts = True

  8. Next
  9. [color=Red]restart:[/color]
  10. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# die78325


    ¤j¤j~ »yªk¿ù»~­C

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-11-27 16:33 ½s¿è

¦^´_ 3# JOSH
['color=red]....['/color]  ³o¬O¦^ÂЧAªº¤å¤¤±N¦rÅé¥[¤WÃC¦âªººô­¶µ{¦¡½X¤£¬Ovbaµ{¦¡½X
¦ý¨Ï¥Î¥N½X®æ¦¡ ©Ò¥HµLªk¦b¦rÅé¥[¤WÃC¦â

¦^´_ 1# JOSH

¬¡­¶Ã¯¤¤¦Ü¤Ö­n¦³¤@­Ó¤u§@ªí
  1. Sub Ex()
  2.     Dim sh As Worksheet
  3.     Application.DisplayAlerts = False
  4.     For Each sh In Sheets
  5.        If Sheets.Count > 1 Then sh.Delete
  6.     Next
  7.     Application.DisplayAlerts = True
  8. End Sub
½Æ»s¥N½X
  1. Sub Ex()
  2.     Application.DisplayAlerts = False
  3.     Do While Sheets.Count > 1
  4.         ActiveSheet.Delete
  5.     Loop
  6.     Application.DisplayAlerts = True
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# JOSH


    COLO   ³o¨Ç¨Æºô­¶¤£¤p¤ß¥X²{ªº §R±¼§Y¥i@@"
GB¤j¤j¤w¦^´_±z³Ì¦nªºµª®×@@

TOP

¦^´_ 5# die78325


    ¤F¸Ñ~~
ÁÂÁÂÅo

TOP

¦^´_ 4# GBKEE


    ª©¤j~~
ÁÂÁ§Aªº«ü¾É
¨ü¯q¨}¦h
ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : ¥@¤W¦³¨â¥ó¨Æ¤£¯àµ¥¡G¤@¡B§µ¶¶ ¤G¡B¦æµ½¡C
ªð¦^¦Cªí ¤W¤@¥DÃD