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

[µo°Ý] Is Nothing»PEmptyªº¥Îªk

[µo°Ý] Is Nothing»PEmptyªº¥Îªk

­n½T»{¬Y¤@°}¦C¬O§_¦s¦b®É¸Ó¥Î¤°»ò¤èªk§PÂ_?
ReDim HeadSone(20)
t1 = 0
t2 = 0
j = 0
For fsi = 15 To 238
    If Cells(fsi, 5) = Cells(fsi + 1, 5) And Cells(fsi, 5) <> Cells(fsi - 1, 5) Then t1 = fsi
    If Cells(fsi, 5) = Cells(fsi - 1, 5) And Cells(fsi, 5) <> Cells(fsi + 1, 5) Then t2 = fsi
        If t1 <> 0 And t2 <> 0 Then
            Set HeadSone(j) = Range(Cells(t1, 5), Cells(t2, 5))
            HS_S(j) = t1
            HS_E(j) = t2
            j = j + 1
            t1 = 0
            t2 = 0
        End If
Next fsi
m = j - 1   '¦@¦³m-1²Õ
If HeadSone(0) = Empty Then  '§PÂ_HeadSone(0)¬O§_¦s¦b
    m = 0
Else
    m = j - 1   '¦@¦³m-1²Õ
End If
ReDim Preserve HeadSone(m)

·íHeadSone(0)¤£¦s¦b®É¤W­z¼gªkOK,¥i¬O·íHeadSone(0)¤£¦s¦b®É¤W­z¼gªk´N·|¥X²{¿ù»~(«¬ºA¤£²Å¦X)
§ï¦¨:
If HeadSone(0) = Is Nothing Then
    m = 0
Else
    m = j - 1   '¦@¦³m-1²Õ
End If

·íHeadSone(0)¤£¦s¦b®É«h·|¥X²{¿ù»~(¦¹¦¸»Ý­nª«¥ó),¥i¬O·íHeadSone(0)¤£¦s¦b®É¸Ó¼gªk´NOK
½Ð°ÝIs Nothing»PEmptyªº¥Îªk¦³¦ó¤£¦P?¸Ó¦p¦ó§ï?

¦^´_ 4# GBKEE
¥t¥~
­Y¬O§Ú·Q±NHeadSone(m)¥þ¼Æ²MªÅ
Set HeadSone(0)=Nothing
Set HeadSone(1)=Nothing
Set HeadSone(2)=Nothing
....
¸Ó¦p¦ó¼g¤ñ¸û¦n?

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD