I am trying to use this code to determine the value of Firstcell but can't get an output:
Sub FindFirstEmptyCell()
Dim l As Integer
Dim Firstcell As Integer
Dim MyArray(5) As String
Dim currentRowValue As String
MyArray(1) = "g"
MyArray(2) = "g"
MyArray(3) = "s"
MyArray(4) = ""
MyArray(5) = "f"
For l = 0 To 5
currentRowValue = MyArray(l)
If IsEmpty(currentRowValue) = True Or currentRowValue = "" Then
Firstcell = l: Exit For
End If
Next
End Sub
Firstcell?Range?