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

VBA¥¨¶°­n¸Ó¤u§@ï©Ò¦³¤u§@ªí³£¥i¥Î¡A¦p¦ó³]?ÁÂÁÂ

VBA¥¨¶°­n¸Ó¤u§@ï©Ò¦³¤u§@ªí³£¥i¥Î¡A¦p¦ó³]?ÁÂÁÂ

VBA¥¨¶°­n¸Ó¤u§@ï(workbook)©Ò¦³¤u§@ªí(worksheet)³£¥i¥Î¡A¦p¦ó³]?ÁÂÁÂ

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-2-16 08:07 ½s¿è

¦^´_ 1# millerch


    ÁÂÁ«e½úµoªí¦¹¥DÃD
«á¾Ç¾Ç²ß EntireColumn.HiddenÄݩʪº½d¨Ò¨Ñ°Ñ¦Ò

Option Explicit
Sub CÄæÅã¥Ü_ÁôÂäÁ´«1()'³o¬O·í¤U¤u§@ªíÄÝ©Ê°õ¦æ
With [C:C].EntireColumn
'¡ô¥H¤U¬OÃö©ó·í¤U¾Þ§@ªí CÄ檺ÄÝ©Ê
   .Hidden = .Hidden <> True
   '¡ô¥OÁôÂÃÄݩʬO:
   '¦pªG·í¤UCÄæ¬OÁôÂêº,µ¥¸¹ªº¥k°¼(.Hidden <> True)Å޿誽¬O0(False),
   '¦]¦¹ .Hidden = False ¥OCÄæÅã¥Ü
   '¦pªG·í¤UCÄæ¬OÅã¥Üªº,µ¥¸¹ªº¥k°¼(.Hidden <> True)Å޿誽¬O1(True),
   '¦]¦¹ .Hidden = True ¥OCÄæÁôÂÃ

End With
End Sub
Sub CÄæÅã¥Ü_ÁôÂäÁ´«2() '»P Sub CÄæÅã¥Ü_ÁôÂäÁ´«1()¥\¯à¬Û¦P¼gªk¤£¦P
[C:C].EntireColumn.Hidden = [C:C].EntireColumn.Hidden <> True
End Sub

Sub ©Ò¦³¤u§@ªíCÄæÅã¥Ü()'³o¬O¦P¤@­ÓÄÝ©Ê°õ¦æ¨C­Ó¤u§@ªí
Dim Sh As Worksheet
'¡ô«Å§iÅܼÆ:Sh¬O¤u§@ªíÅܼÆ
For Each Sh In Worksheets
'¡ô³]ª«¥ó°j°é!¥OSh³o¤u§@ªíÅܼƬO¥þ³¡¤u§@¤¤ªº¨ä¤¤¤@ªí
   Sh.[C:C].EntireColumn.Hidden = False
   '¡ô¥OShÅܼƪºCÄæÁôÂÃÄÝ©Ê ¤£¯u ,§Y¬O¤£ÁôÂÃCÄæ=(Åã¥ÜCÄæ)
Next
End Sub

¦pªG¥H¤W³£¤£¬O«e½úªºÃD·N,«Øij«e½ú±Nµ{¦¡½XPO¤W¨Ó
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¨S¦³©Ò¦³Åv¡A¥u¦³¥Í©Rªº¨Ï¥ÎÅv¡C
ªð¦^¦Cªí ¤W¤@¥DÃD