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

[µo°Ý] §PÂ_¦Û°Ê¿z¿ïAutoFilterªº°ÝÃD

[µo°Ý] §PÂ_¦Û°Ê¿z¿ïAutoFilterªº°ÝÃD

§Ú­n¦p¦ó§PÂ_Sheets ¤º¬O§_¦³¦s¦b¦Û°Ê¿z¿ï,¦pªG¦³ªº¸Ü­n¨ú®ø
³o¬O§Ú·Qªº¡ã·íµM¤£¯à¥Î...
If selection.autofilter = true then selection.autofilter = False else
«á¨Ó§Q¥Î FilterMode ¥h§PÂ_¡A¦ý¬O¥u¦³¦b¦³¿z¿ïªº®É­Ô¤~¬OTrue ¨ä¥L³£¬°false
If Worksheets.FilterMode = True
½Ð¤j®aÀ°¦£§Ú¤@¤U

If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData

TOP

oobird ¤j¤j
If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData
±qºÊ¬Ý¦¡¬ÝActiveSheet.FilterMode ªº­È¤@ª½¬OFalse
°£«D¦Û°Ê¿z¿ï¦³"¿z¿ï"­È¤~·|¬OTrue,ShowAllData¤]¥u¬O§â¦Û°Ê¿z«Å¿ï©ñ±¼
¨Ã¤£¬O¥h¡¨¨ú®ø¡¨¦Û°Ê¿z¿ï

TOP

¦^´_ 3# uf023630
  1. Sub Ex()
  2.     With ActiveSheet
  3.         If Not .AutoFilter Is Nothing Then .UsedRange.AutoFilter
  4.     End With
  5. End Sub
½Æ»s¥N½X

TOP

¬Ý¨Ó¼Ó¥Dªº·N«äÀ³¸Ó¬O¡G
If ActiveSheet.AutoFilter Is Nothing Then
MsgBox "µL¦Û°Ê¿z¿ï"
Else
MsgBox "¦³¦Û°Ê¿z¿ï"
End If

TOP

«u§r~­ì¨ÓAutoFilter «á­±¬O­n¥Î Is Nothing  ¤£¬O¥ÎFalse or True «u§r~¯u¬O ¨£¯º¤F
·PÁÂGBKEE¤j¤j¤@¦¸¸Ñ¨M§Ú¨â­Ó°ÝÃD

TOP

¦^´_ 6# uf023630
AutoFilter ¬Oª«¥ó
ª«¥ó¤£¦s¦b   ª«¥ó Is Nothing   
ª«¥ó¦s¦b      Not ª«¥ó Is Nothing

TOP

        ÀR«ä¦Û¦b : ¡i»X½ªªº¦Û¥Ñ¡j¤H±`¦b¤°»ò³£¥i¥H¦Û¥Ñ¦Û¦bªº®É­Ô¡A«o³Q³oºØÀH¤ß©Ò±ýªº¦Û¥Ñ»X½ª¡AµêÂY®É¥ú¦Ó²@µLıª¾¡C
ªð¦^¦Cªí ¤W¤@¥DÃD