|
γ 様
ありがとうございます。
仰る通りです。
エラーが生じるコードは
Function 支(ByRef currentRow As Long, ByVal flag As Boolean, ByVal 列 As Byte)
With ActiveSheet
Dim myLevel As Byte
myLevel = Val(.Range("H" & currentRow))
Do
Dim I_Flag As Boolean
I_Flag = CStr(.Range("Q" & currentRow)) = "380"
If Not I_Flag Then
If flag Then
Set ss = Me.Range("E3:E453").Find(Left(.Range("F" & currentRow), 13), LookIn:=xlValues, LookAt:=xlPart)
If ss Is Nothing Then Set ss = Me.Range("E3:E453").Find(Left(.Range("F" & currentRow), 11) & "X" & Mid(.Range("F" & currentRow), 13, 1))
I_Flag = ss Is Nothing
If Not I_Flag Then I_Flag = Me.Cells(ss.Row, 列) = ""
If Not I_Flag Then
If Left(.Range("K" & currentRow), 1) <> "ム" Then
.Range("K" & currentRow) = "ム←" & .Range("K" & currentRow)
.Range("K" & currentRow).Interior.ColorIndex = 33
End If
ElseIf Left(.Range("K" & currentRow), 2) <> "ジ" Then
.Range("K" & currentRow) = "ジ←" & .Range("K" & currentRow)
.Range("K" & currentRow).Interior.ColorIndex = 33
End If
End If
ElseIf Left(.Range("K" & currentRow), 2) <> "ジ" Then
.Range("K" & currentRow) = "ジ←" & .Range("K" & currentRow)
.Range("K" & currentRow).Interior.ColorIndex = 33
End If
currentRow = currentRow + 1
If myLevel < Val(.Range("H" & currentRow)) Then Call 支(currentRow, I_Flag, 列)
Loop Until myLevel > Val(.Range("H" & currentRow))
End With
End Function
です。
|
|