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

VBA¿ï¨ú¬õ¦â¯Á¤Þ¼ÐÅÒ¥X²{¿ù»~

VBA¿ï¨ú¬õ¦â¯Á¤Þ¼ÐÅÒ¥X²{¿ù»~

¦U¦ì¦Ñ®v,³o¬O§Ú¼gªºÃö©ó¿ï¨ú©Ò¦³¯Á¤Þ¼ÐÅÒ¬°¬õ¦âªº¼ÐÅÒ,¦b¤@­Ó¤ñ¸û¤Ösheetsªº¬¡­¶Ã¯¸Õ¹L¥i¥H,¦ý¬O¤§«á¦b¤@­Ó¤ñ¸û¦hsheetsªº¬¡­¶Ã¯¨Ï¥Îªº®É­Ô«oµo¥Í¿ù»~

Sub ¿ï¨ú¬õ¦â()

n = Worksheets.Count
a = 1
For i = 1 To n
If Sheets(i).Tab.ColorIndex = 3 Then
Sheets(i).Select False

End If
Next
End Sub
error.JPG

ÂI°»¿ù¬Ý¨ì¶À¦âªº¬OSheets(i).Select False ¨º¦æ,²¾¹L¥hÅã¥Üi=73
·Q½Ð°Ý¨ì©³¬O­þ¸Ì¥X¤F¿ù?

¦U¦ì¦Ñ®v,³o¬O§Ú¼gªºÃö©ó¿ï¨ú©Ò¦³¯Á¤Þ¼ÐÅÒ¬°¬õ¦âªº¼ÐÅÒ,¦b¤@­Ó¤ñ¸û¤Ösheetsªº¬¡­¶Ã¯¸Õ¹L¥i¥H,¦ý¬O¤§«á¦b¤@­Ó ...
fengetianxia µoªí©ó 2016-5-16 18:02

·Pı¤W¬O OverFlow (¶W¹L¨t²Î³\¥iªº½d³ò)¤F,
§A¯uªº¦³»Ý­n¤@¦¸½Æ¿ï³o»ò¦h­Ó¶Ü?

TOP

¦^´_ 2# luhpro


    ÁÂÁ¦^ÂÐ
½T¹ê¤U­±·|¦³¥i¯à¤@¦Ê¨ì¨â¦Ê¦hªº¬õ¦â¼ÐÅÒ
¦pªG¯uªº¬O¨t²Îªº­­¨î,§Ú·Q¥u¯à¤À´X¦¸§¹¦¨©ÎªÌ±N©Ò¦³sheet¤À³Î¨ì¤£¦Pªº¬¡­¶Ã¯¤¤¤F

TOP

¦^´_ 3# fengetianxia
¦pªG¤u¥ªªí³æ¤¤¦³ªí³æ (Tab) ¼Ð¥Ü¬õ¦â¯Á¤Þ¼ÐÅÒ¡A
¦Ó¥B¥¦¬O³QÁôÂà (Hidden) °_¨Óªº¸Ü¡A¦b°õ¦æ¨ì®É
(Sheets(i).Select False) ·|²£¥Í¿ù»~°T®§¡C
½Ð¦Û¦æÀˬd¬O§_¨ä¤¤¦³³Q ÁôÂà (Hidden)  ªºªí³æ¡C

TOP

¦^´_ 1# fengetianxia
¥¼¤FÁקK¦¹§x´o¡A§A¥i¥Hµyµy­×§ï¦¨¡G
  1. If Sheets(i).Tab.ColorIndex = 3 And Sheets(i).Visible Then
½Æ»s¥N½X
«K¸U¨Æ OK ¤F¡C

TOP

¦^´_ 5# c_c_lai


    ¸U¤À·PÁÂ,OK¤F

TOP

        ÀR«ä¦Û¦b : ¦³®É·í«äµL®É­W¡A¦n¤Ñ­n¿n«B¨Ó³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD