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

[µo°Ý] EXCEL ­×§ï¸ê®Æªº°ÝÃD

[µo°Ý] EXCEL ­×§ï¸ê®Æªº°ÝÃD

¤£¦n·N«ä¡A³Â·Ð¦U¦ì°ª¤â¸Ñ´b¤@­Ó°ÝÃD
§Ú¤@­ÓEXCELÀɮ׸̦³100­ÓSHEET
§Ú·Q¦b"¨C­Ó"SHEETªºA1:A30¡B D1:D30¡B G1:G30ªº¼Æ­È¬Ò§ï¬°0
¤£ª¾¹D«ç»ò¼¶¼gVAB?

  1. Sub Test()
  2. Dim wbBook As Workbook
  3. Dim wsSheet As Worksheet
  4. Set wbBook = ActiveWorkbook
  5. For Each wsSheet In wbBook.Worksheets
  6.     With wsSheet
  7.         .Range("A1:A30").Value=0
  8.         .Range("D1:D30").Value=0
  9.         .Range("G1:G30").Value=0     
  10.     End With
  11. Next wsSheet
  12. End Sub
½Æ»s¥N½X

TOP

ÁÂÁ¡A°ÝÃD¸Ñ¨MÅo^^

TOP

¦^´_ 1# wu731230
  1. Option Explicit
  2. Sub Ex()
  3.     With ActiveWorkbook
  4.        '*****************************************
  5.        'With Workbooks(2)  ' ¤£¬O§@¥Î¤¤ªº¬¡­¶Ã¯Ã¯
  6.        ' .Activate
  7.        '*****************************************
  8.         .Sheets.Select
  9.         .ActiveSheet.Range("A1:A30,D1:D30,G1:G30").Select
  10.          Selection.Value = 0
  11.     End With
  12. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤Ó¶§¥ú¤j¡B¤÷¥À®¦¤j¡B§g¤l¶q¤j¡A¤p¤H®ð¤j¡C
ªð¦^¦Cªí ¤W¤@¥DÃD