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

[µo°Ý] ¬¡­¶Ã¯¯à¥Î°}¦C¦P®ÉÁôÂéΥX²{¶Ü¡H

¦^´_ 10# ML089
§Ú²z¸Ñ ­ã´£³¡ªL¤j¤j ©Ò»¡ªº¡Aªí³æ
Visible ¶¶§Ç­Y¬° 1, 0, 1 °õ¦æ«á¡A
«h Visible ¤º®e±NÅܦ¨ 0, 1, 0¡F
µ²ªGÁÙ¬O¦³¤@±i¥¼³QÁôÂð_¨Ó¡I
¨äªí¹F§Y¬°§Ú©Ò´£°Ýªº #6¡C
©Ò¥Hµ²ªG¬O¦³¨Ç³\ªº¤£¦PÄÀ¸q¡C

TOP

¦^´_  c_c_lai


ARR = Array("¤u§@ªí2", "¤u§@ªí3", "¤u§@ªí4")
TF = 1 + Sheets(ARR(0)).Visible
F ...
­ã´£³¡ªL µoªí©ó 2016-5-2 14:04


©Ò¥H½Ð±Ð«e½ú ¹³¬O§Ú³o¼Ëªº¸¨¸¨ªøªí³æ¡A¤]¥i¥H¥Î±zªº¤è¦¡°µÁôÂöÜ?
  1. Sheets("Sav").Select
  2.     ActiveWindow.SelectedSheets.Visible = False
  3.     Sheets("Exh").Select
  4.     ActiveWindow.SelectedSheets.Visible = False
  5.     Sheets("J.C.W").Select
  6.     ActiveWindow.SelectedSheets.Visible = False
  7.     Sheets("P.C.O").Select
  8.     ActiveWindow.SelectedSheets.Visible = False
  9.     Sheets("Pmax").Select
  10.     ActiveWindow.SelectedSheets.Visible = False
  11.     Sheets("Stuffing Box").Select
  12.     ActiveWindow.SelectedSheets.Visible = False
  13.     Sheets("F.O.").Select
  14.     ActiveWindow.SelectedSheets.Visible = False
  15.     Sheets("Liner").Select
  16.     ActiveWindow.SelectedSheets.Visible = False
  17.     Sheets("Á`ªí").Select
½Æ»s¥N½X

TOP

¦^´_ 12# chaoyiho


Arr = Array("Sheet2", "Sheet3", "Sheet4")

( ÂŦâ¦r¬q ) ¤§¤º©ñ¤J«ü©wªº¤u§@ªí[¦WºÙ], ¥H" "¥]ÂÐ, ¥H[³rÂI]¤À¹j!!!

TOP

¦^´_ 13# ­ã´£³¡ªL

ÁÂÁ«e½úªº¦^µª ¥i¬O§Ú¤£©ú¥Õªº¬O
  1. Dim arr As Variant, xS As Variant

  2.     Static tf As Boolean

  3.    
  4.     tf = Not tf

  5.     arr = Array("Sav", "Exh", "J.C.W", "P.C.O", "Pmax", "Stuffing Box", "F.O.", "Liner", "Á`ªí")

  6.         tf = 1 + Sheets(arr(0)).Visible
  7.         
  8.     For Each xS In arr
  9.    
  10.         Sheets(xS).Visible = tf
½Æ»s¥N½X
¬°¦ó³o¼Ëªº³]©w¤§¤U¸ò¨ä¥LªF¦èµ²¦X«á·|¥X²{¿ù»~¥N½X91©O?



À³¸Ó¬O¸ò¨ä¥Lµ{¦¡½XµLÃö¤~¹ïªü?

TOP

¦^´_ 14# chaoyiho


Dim arr, xS, tf
arr = Array("Sav", "Exh", "J.C.W", "P.C.O", "Pmax", "Stuffing Box", "F.O.", "Liner", "Á`ªí")
tf = 1 + Sheets(arr(0)).Visible
For Each xS In arr
¡@¡@Sheets(xS).Visible = tf
Next

TOP

¦^´_ 15# ­ã´£³¡ªL

¹Á¸Õ¹L«áªº½T¥i¦æ!!

¤S¾Ç¨ìª¾ÃѤF ·PÁ«e½ú!!

¥t¥~§Ú¦³µo°Ý¤@­Ó·s°ÝÃD

¤]¬O¸ò³o­Ó¦³Ãö«Y

¦pªG«e½ú¤£¶û³Â·Ð ÁٽЫe½ú¦Ü·s°ÝÃD«ü±Ð

«D±`·PÁÂ!

TOP

¦^´_ 12# chaoyiho
  1. Sub Ex()
  2.     Dim arr As Variant, xs As Variant
  3.     Static tf As Boolean
  4.    
  5.     tf = Not tf
  6.     arr = Array("Sav", "Exh", "J.C.W", "P.C.O", "Pmax", "Stuffing Box", "F.O.", "Liner", "Á`ªí")

  7.    
  8.     For Each xs In srr
  9.         Sheets(xs).Visible = tf
  10.     Next
  11. End Sub
½Æ»s¥N½X
  1. Sub Ex2()
  2.     Dim arr As Variant, xs As Variant
  3.     Dim tf As Boolean
  4.    
  5.     arr = Array("Sav", "Exh", "J.C.W", "P.C.O", "Pmax", "Stuffing Box", "F.O.", "Liner", "Á`ªí")

  6.     tf = 1 + Sheets(arr(0)).Visible
  7.    
  8.     For Each xs In srr
  9.         Sheets(xs).Visible = tf
  10.     Next
  11. End Sub
½Æ»s¥N½X
Ex() »P Ex2() ¬OÄÝ©ó¨â­Ó¤£¦P«Å§i¤è¦¡ªºÀ³¥Î¡G
¦ý²×¨äµ²ªG°õ¦æ§¹«á¤@¼Ë¬O¹F¦¨ ¡yªí³æÅã²{¡z¡B
¥ç©Î¡yªí³æÁôÂázªº»Ý¨D¡C

¤@¡B¡u«¬ºA«Å§i¡v¡G
Ex() ¸Ì¯S·N±N tf «Å§i¦¨¤@­ÓÀRºA¥¬ªL (Static Boolean)
ÅܼơF¥ç§Y¸Ó¨ç¦¡ Ex() ¤@¸g±Ò¥Î tf §Y¬° False¡A ·í§A
±N¥¦ªº­È§ïÅܤF¡A¨Ò¦p¡Gtf = Not tf¡A tf ­È«h¥Ñ False
ÅÜ§ó¬° True¡A·í¤U¤@¦¸¦A«×¶i¤J¨ì¸Ó¨ç¦¡ Ex() ¸Ì°õ¦æ®É¡A
¥¦ªº­È¨Ì¬° True ¤£ÅÜ¡A°£«D¥¦¦A¦¸¸I¨ì tf = Not tf
ªº­«·sµ¹­È¡F tf ªº­È§Y³Q­×¥¿¦¨¬° False¡C
¦¹ºØ¤è¦¡¸g±`¥Î©ó¬Y¨Ç¨ç¦¡©ó°õ¦æ®É¡A»Ý¥Î¨ì¨ç¦¡
¤º³¡¨Ï¥ÎÀRºA«O¯d­È(«D¤½¥ÎÅܼÆ)§@·~Àô¹Òªº°õ¦æ¡C³o¤]¬O
¬°¦ó­n±N¥¦«Å§i¦¨ÀRºA¥¬ªL (Static Boolean) Åܼƪº¹D²z¡F
¾Ç²ß°£¤F­n¯à¸Ñ¨MºÃÃøÂø¯g¥~¡AÁÙ¶·¦³¡y±o¥H«ä¦Ò¡zªºªÅ¶¡¡C

Ex2() ¸Ì±N tf «Å§i¦¨¤@­Ó¥¬ªL«¬ºA (Boolean) ªºÅܼơF¥¦
¦b¨C¦¸¶i¤J Ex2() ¨ç¦¡¸Ì®É¡A¸Ó tf ªº­È¥Ã»·¬°  False ­È¡A
©Ò¥H§A¥²¶·¨C¦¸­n¦A­«·sµ¹­È¡F§_«h¥¦ªº­È¬O¬°  False ªº¡F
³o¥ç¬O¤º³¡°ÊºAÅܼƪº¯S¼x (ªì©l­Èªºµ¹¤©)¡C

¤G¡B¡uÅܼƭȤ§µ¹­È¡v¡G
Ex() ¨ç¦¡¸Ì tf = Not tf¡F
tf ¬°¤@ÀRºA¥¬ªL (Static Boolean) ÅܼơA¨ä²Ä¤@¦¸°õ¦æ±Ò°Ê
ªºªì©l­È¬° False ­È¡A·í²Ä¤@¦¸¹J¨ì tf = Not tf ªºµ¹­È¡A¥¦«h
­×¥¿¬° True¡F©ó¤U¦¸¦A¦¸¶i¤J¨ì Ex() ¨ç¦¡¸Ì tf ªº­È¨Ì¬° True
¤£ÅÜ¡A°£«D¥¦¦A¦¸¸I¨ì tf = Not tf ªº­«·sµ¹­È¡F tf ªº­È©lÅܬ°
False¡C¥¦°í«Hªº­ì«h¬O¤£¨ü¥~¦b¨ç¦¡ªº§ïÅܦӼvÅT¨ä­Èªº¤£·í²§°Ê¡C

Ex2() ¨ç¦¡¸Ì tf = 1 + Sheets(arr(0)).Visible¡F
¦¹³Bªº tf ªºµ¹­È¡A¬O¨Ì¾Ú¶i¤J¨ì Ex2() ¨ç¦¡·í®É¸Ìªº²Ä¤@­Óªí³æ
Sheets(arr(0)).Visible ¬° ¡yªí³æÅã²{¡z¡B¥ç©Î¡yªí³æÁôÂáz¦Ó¨M©w¡F
°²³]¦¹®É Sheets(arr(0)).Visible ­È¬° -1 (ªí³æÅã²{)¡A«h·í tf =
1 + Sheets(arr(0)).Visible ®É¡F¨ä­È«h­×¥¿¬° 0 (ªí³æÁôÂÃ)¡F
¤Ï¤§¡B ¶i¤J¨ì Ex2() ¨ç¦¡·í®É¡A Sheets(arr(0)).Visible ­È¬° 0 ®É¡F
¸g¹L tf = 1 + Sheets(arr(0)).Visible ªº¦A­«·sµ¹­È¡F¨ä­È«h¤S­×¥¿¬° 1
(ªí³æÅã²{)¡F

µ²½×¬O¡GµL½×§AÀ³¥Î¦óºØ«¬ºA©Î¤è¦¡¨Ó³B²z¡F³Ì­«­nªº¬O§A­Ó¤Hªº«ä¦Ò¤è¦V¡B
»Pºc«ä¬°¦ó¡FµL©Ò¿×ªº¹ï¿ù¬O«D°ÝÃD¡A¥u¦³­Ó¤H¦Ò¶qªº¨¤«×«äºû¤§ªí¹F®t²§¡C
µ{¦¡½s¼¶§Þ¥©¯à§_¦³©Ò¼W¶i¡B¬ð¯}­Ó¤H«äºûªº¦º¨¤¡F¥u¦b©ó§A­Ó¤Hªº¥ø¹Ï¤ß
¤Î­Ó¤H·N¹Òªº°l¨D§¹¬ü½}¤F¡C

TOP

¦^´_ 17# c_c_lai

ÁÂÁ«e½úªº¦^µª
§Ú·|«ùÄòªºÆp¬ã!
¦³°ÝÃD¤]½Ð¨ä½ú¤£¹½¨ä·Ðªº«ü±Ð!
ÁÂÁ«e½ú

TOP

·PÁ ¤p§Ì¨ü±Ð¤F

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¤£¤@©w²y²y¬O¦n²y¡A¦ý¬O¦³¾ú½mªº±j¥´ªÌ¡AÀH®É³£¥i¥H´§´Î¡C
ªð¦^¦Cªí ¤W¤@¥DÃD