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

[µo°Ý] ¦n©_¡A§R¤£±¼ªºªÅsheetsµ{¦¡µ¡

[µo°Ý] ¦n©_¡A§R¤£±¼ªºªÅsheetsµ{¦¡µ¡

¥»©«³Ì«á¥Ñ ui123 ©ó 2017-8-31 13:46 ½s¿è

¦U¦ì¦³¹J¹L³o­Ó°ÝÃD¶Ü? §Ú§R±¼sheet«á ¡AVBA µ{¦¡µ¡«o¯d¤U¤@°ïªÅsheet¡A¦³¬Ý¨ì¤§«e¤@½g(http://forum.twbts.com/viewthread.php?tid=4369)¡A¦ý¬O§ä¤£¨ì"½s¿è>¨ì>¯S®í>ª«¥ó---->½T©w"
¤£ª¾¹D­n«ç»ò¥Î¥¨¶°§R±¼¡A©Î§Ú­ì¥»§Rsheetªºµ{¦¡¥i¥Hª½±µ§R°£

­ì¥»§Rsheetªºµ{¦¡¦p¤U:

    Dim xWs As Worksheet
    For Each xWs In Application.ActiveWorkbook.Worksheets
        If  xWs.Name <> "Template" And xWs.Name <> "Template journal"  Then
            xWs.Delete
        End If
    Next
javascript:;

javascript:;

qqq.JPG (33.37 KB)

§R¤£±¼ªºsheet

qqq.JPG

old.JPG (26.51 KB)

§ä¤£¨ì

old.JPG

¤£µ¹§Ú§R
javascript:;

nodelete.JPG (15.33 KB)

nodelete.JPG

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2017-8-31 15:40 ½s¿è

¦^´_ 2# ui123

oobird ¶Wª©¤£¬O»¡
¦b±M®×Á`ºÞùØ=microsoft visual  basic ->VBA project ->microsoft excel ª«¥ó
¦b³o¸Ì¬O¦C¥X§Aªº¨C­Ó¤u§@ªí¡A³Ì«á¤@¶µ¬O¬¡­¶Ã¯¡AÂI¶i¥h´N¬O¥L­Ìªº¼Ò²Õ¡A§A­Y¨S¼gµ{¦¡¥L­Ì·íµM¬OªÅªº¡A¦ý¤£¥NªíµL¥Î¡C¤£¯à§R¡C

¤u§@ªí¥i¥H§R,°ÝÃD¬O     For Each xWs In Application.ActiveWorkbook.Worksheets
ªºActiveWorkbook¬O­n§R°£¤u§@ªíªº¬¡­¶Ã¯¶Ü?
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# GBKEE

¶W¯Åª©¥DGBKEE¡AÁÂÁ±zªº¦^µª
³o´N¬O§Ú§R¤£±¼ªºVBAªÅsheetÀÉ®×...."¦n¦h­ÓªÅsheet¦bVBA±M®×¸Ì"¡A¦n©Ç¡A§¹¥þ¨S§@¥Î¡A¦ý§Ú¨S¿ìªk§R°£¡A¦Ó¥BÀHªÌ§Ú¶]¥¨¶°¶V¨Ó¶V¦h¡A¦n®£©Æ°Ú~
¦³¿ìªk§R±¼¶Ü? ¥Î¥¨¶°°j°é±±¨îª«¥ó¥h§R¡A¦hÁ«üÂI©ú¿O :dizzy:

javascript:;
javascript:;

¹Ï¤ù 1.jpg (59.17 KB)

WantdeleteVBAsheets

¹Ï¤ù 1.jpg

¹Ï¤ù 1.jpg (59.17 KB)

¹Ï¤ù 1.jpg

WantdeleteVBAsheets.zip (36.42 KB)

WantdeleteVBAsheets

TOP

¦^´_ 3# GBKEE


    ¦n®£©Æ........

javascript:;

¹Ï¤ù 2.jpg (19.2 KB)

¹Ï¤ù 2.jpg

TOP

¥»©«³Ì«á¥Ñ HUNGCHILIN ©ó 2017-9-1 00:28 ½s¿è

ui123 & ´I­ô¦n

³o°ÝÃD§Ú¹J¹L¡A¦ÑÀÉ®×±qExcel2000¡A2002¡A2003¡A2007³£¦³¦s¨ú¹L¡C´«·s¹q¸£´«¦¨Excel2007¡AÁÙ¬O2010®É¡Aª©¥»²§±`³y¦¨¡A¶}±Ò¨Ï¥Î´N¨º­Ó¦ÑÀÉ®×·|²§±`¡AVB½s¿è¾¹¤º¡A·|¤£Â_¬Ý¨ì°²ªºsheet¤£Â_¼W¥[¡A²Ö¥[¡A¤£¤@©w­n¶]VBA¦³®É«ö¦sÀÉ´N¦³¡A¤£®É·|¦Û¤v¼W¥[¡C

³Ì«á¬°¤F¬Ù®É¶¡¡Aª½±µ´«´ß¤F¡A´N¬O§â©Ò¦³sheet,VB±M®×²¾°Ê¨ì·s¬¡­¶Ã¯¡A´N¦n¤F¡A¤£¹L«á¨Ó¡A¦n¹³¤Sµo¥Í¤F£¸¦¸¡A§Ú¤S´«´ß£¸¦¸¡A§âÀÉ®×¥t¦s¦¨xlsm¡A¦A¦s¦^Xls¡A´N¦n¤F¡C

§Æ±æ¦³©ÒÀ°§U

TOP

¦^´_ 6# HUNGCHILIN

HUNGCHILIN¤j¤j¡A·PÁ±z
¤µ¤Ñ¸Õ¤F¤@¤U¡A¥u¯à§âexcel¸Ìªº¥¨¶°³£§R±¼³s¼Ò²Õ¤@°_§R±¼«á¦sÀÉ¡AÀx¦s«á­«¶}´N·|®ø¥¢¡A
¦ü¥GµLªkª½±µ¥Îµ{¦¡§R±¼

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤H¤£©È¿ù¡A´N©È¤£§ï¹L¡A§ï¹L¨Ã¤£Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD