VBA¥¨¶°n¸Ó¤u§@ï©Ò¦³¤u§@ªí³£¥i¥Î¡A¦p¦ó³]?ÁÂÁÂ
- ©«¤l
- 10
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 52
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS
- ³nÅ骩¥»
- 11
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2022-12-1
- ³Ì«áµn¿ý
- 2024-12-1
|
VBA¥¨¶°n¸Ó¤u§@ï©Ò¦³¤u§@ªí³£¥i¥Î¡A¦p¦ó³]?ÁÂÁÂ
VBA¥¨¶°n¸Ó¤u§@ï(workbook)©Ò¦³¤u§@ªí(worksheet)³£¥i¥Î¡A¦p¦ó³]?ÁÂÁ |
|
|
|
|
|
|
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-5
|
¥»©«³Ì«á¥Ñ 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
|
|
|
|
|