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

[µo°Ý] ¦p¦ó¤Þ¥Îtypename(selection)§P©w¬O§_¬°©w¸q½d³òªºÀx¦s®æ¦ì¸m©O¡H

[µo°Ý] ¦p¦ó¤Þ¥Îtypename(selection)§P©w¬O§_¬°©w¸q½d³òªºÀx¦s®æ¦ì¸m©O¡H

¥»©«³Ì«á¥Ñ dechiuan999 ©ó 2010-9-21 12:42 ½s¿è

¦U¦ì¤j¤j¦n¡G

  ¤p§Ì¹ï©w¸q½d³ò¡A¦bÀ³¥Î¤W
¤´µLªk¤W¤â¡C»¡©ú¸Ô¦pªþ¥ó

test.rar (4.49 KB)

If Not Intersect(Selection, [student]) Is Nothing Then

TOP

ÁÂÁ¶W¯Åª©¥D¡C

intersect¦³¾Ç¹L¡A«o
¤£À´±oÀ³¥Î¡C
¤p§Ì¯u¸Ó¥´§¾ªÑ¤F¡C
Sub aa()   
    Dim mSht As Worksheet
    Dim mRng As Range   
    Set mSht = Worksheets("test")
    With mSht
        If Not Intersect(Selection, [student]) Is Nothing Then
            If TypeName(Selection) = "Range" Then
                Set mRng = Selection
                MsgBox mRng.Address
            End If
        End If        
    End With   
  End Sub

·P®¦ª©¥D¤j¤j¡C

TOP

¦^´_ 3# dechiuan999
If Not Intersect(Selection, [student]) Is Nothing Then
            If TypeName(Selection) = "Range" Then

³o¨â¦æ­n¹ï½Õ ¥ý§PÂ_¬° "Range"  ¦A §PÂ_ Intersect(Selection, [student])

TOP

ÁÂÁª©¥D¡C

¤p§Ì¯u¬O¶V¨Ó¶V°g½k¡C
ÁÂÁª©¥D¤j¤jªºªÈ¥¿¡C

TOP

        ÀR«ä¦Û¦b : ¦h°µ¦h±o¡C¤Ö°µ¦h¥¢¡C
ªð¦^¦Cªí ¤W¤@¥DÃD