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

[µo°Ý] ¸T¤î¨Ï¥Î¶i¶¥¿z¿ï°ÝÃD

¦^´_ 1# asimov


    http://www.excelforum.com/excel-worksheet-functions/622120-disabling-the-advanced-filter-function.html

After i protect the sheet and disable the autofilter function
The Advanced Filter menu can be disabled just like any other menu item using VBA.
The following statement will disable that entry:
¦b³Q«OÅ@ªº¤u§@ªí¤U¸T¥Î¶i¶¥¿z¿ï
¥L¬O¥ÎVBA¼gªº...³Â·Ðasimov¥ý¶i..±z¨ì³oºô¯¸¥h¬ÝÅo...
http://translate.google.com.tw/translate?hl=zh-TW&sl=en&tl=zh-TW&u=http%3A%2F%2Fwww.excelforum.com%2Fexcel-worksheet-functions%2F622120-disabling-the-advanced-filter-function.html&anno=2

¥N½X¡G Code:
Application.CommandBars
Application.CommandBars("Data").
Controls("Filter").Controls("Advanced Filter...")
Enabled
¾Ç¦p°f¤ô¦æ¦à ¤£¶i«h°h

TOP

¦^´_ 6# asimov

asimov¥ý¶i
   
http://translate.google.com.tw/translate?hl=zh-TW&sl=en&tl=zh-TW&u=http%3A%2F%2Fwww.excelforum.com%2Fexcel-worksheet-functions%2F622120-disabling-the-advanced-filter-function.html&anno=2

³o½g¤å³¹ªº³Ì«á1¥y´N¬O±z­nªºµ²ªGªº...±z¥i¥H¸Õ¸Õ¬Ý.....

The following code would re-activate the Advanced Filter menu option, and could be placed in the ThisWorkbook module.
In the VB Editor (press ALT+F11 to get there), double-click on the 'ThisWorkbook' entry in the left-hand column, then paste this code:
¦bVB½s¿è¾¹¡]«öAlt + F11¨ì¨º¸Ì¡^¡AÂùÀ»ªº'ªºThisWorkbook'¶µ¥Ø¦b¥ª°¼¦C¤¤¡AµM«á¶K¤W¦¹¥N½X¡G



¨ú®ø:Application.CommandBars Application.CommandBars("Data").Controls("Filter").Controls("Advanced Filter...").Enabled = False

«ì´_(±Ò¥Î):Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars("Data").Controls("Filter").Controls("Advanced Filter...").Enabled = True End Sub

¦^´_ #7 GBKEE

ª©¥D¥i¥H¥t¥~½Ð°Ý±zµ{¦¡¤¤ªº(, 901).¬O¤°»ò·N«ä¶Ü?ÁÂÁ±z¡K
¾Ç¦p°f¤ô¦æ¦à ¤£¶i«h°h

TOP

¦^´_ 10# asimov

asimov¥ý¶i
³o°ÝÃD°Ý¹LGBKEEª©¥D¤~ª¾¹D¨º½g­^¤å
¬O¥H"­^¤å"¥h°µ«OÅ@¤u§@ªí«á--¸T¤î¿z¿ï
    Application.CommandBars("Data").Controls("Filter").Controls("Advanced Filter...")
=Application.CommandBars.FindControl(, 901)=¶i¶¥¿z¿ï«ü¥O
¦ý³o¬O­^¤åª©(²ÊÅé¦rªº³¡¥÷), ¤£¾A¥Î©ó¤¤¤åª©
¶i¶¥¿z¿ï«ü¥OªºID ¬° 901,  ¨C¤@­Ó«ü¥O³£¦³¤@­Ó¤£¦Pªº ID¸¹½X
©Ò¥H±z´£°Ý¬O"¶i¶¥¿z¿ï"ID´N¬O901
¾Ç¦p°f¤ô¦æ¦à ¤£¶i«h°h

TOP

        ÀR«ä¦Û¦b : ¤£­n¤p¬Ý¦Û¤v¡A¦]¬°¤H¦³µL­­ªº¥i¯à¡C
ªð¦^¦Cªí ¤W¤@¥DÃD