dabearsrock
09-20-2011, 11:08 PM
I'm trying to figure out why I get the error referenced in the thread title. The function content works, I checked it already, so I must be doing something wrong in calling the function. Thanks.
Here is my code:
Function Insert_Row_If_Appropriate(Excel_Range As range)
If Count_UnBlank_Rows(Excel_Range) >= 3 Then
Excel_Range.Rows(Excel_Range.Rows.Count).EntireRow.Insert
End If
End Function
Sub knowledge_tree()
Dim Range_1 As range
Set Range_1 = range("Tree_Body")
Insert_Row_If_Appropriate (Range_1)
End Sub
Here is my code:
Function Insert_Row_If_Appropriate(Excel_Range As range)
If Count_UnBlank_Rows(Excel_Range) >= 3 Then
Excel_Range.Rows(Excel_Range.Rows.Count).EntireRow.Insert
End If
End Function
Sub knowledge_tree()
Dim Range_1 As range
Set Range_1 = range("Tree_Body")
Insert_Row_If_Appropriate (Range_1)
End Sub