I keep getting the following error "Compile Error: Loop without Do"
I am checking to see if A13 is empty if it is then enter the value in txtorganization in cell A13 then end loop else increase cellposition by 1 and repeat the process...
any ideas how to solve this error??
Private Sub cmdInsert_Click()
Dim CellPosition, counter
counter = 1
CellPosition = a13
Do While counter <= 10
If [CellPosition].Value = " " Then
[CellPosition].Value = txtOrganization.Value
Exit Do
Else
CellPosition = a13 + 1
counter = counter + 1
Loop
End Sub
I am checking to see if A13 is empty if it is then enter the value in txtorganization in cell A13 then end loop else increase cellposition by 1 and repeat the process...
any ideas how to solve this error??
Private Sub cmdInsert_Click()
Dim CellPosition, counter
counter = 1
CellPosition = a13
Do While counter <= 10
If [CellPosition].Value = " " Then
[CellPosition].Value = txtOrganization.Value
Exit Do
Else
CellPosition = a13 + 1
counter = counter + 1
Loop
End Sub