Sub test_loop()
For k = 1 To 5
If k <> 3 Then
MsgBox k
End If
Next k
End Sub
--
Regards,
Tom Ogilvy
"Andibevan" <Andibevan@notehere-hotmail.com> wrote in message
news:%23I9sprlBGHA.3064@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> If I try the following I get a Next without For error - Is it possible to
do
> something like this?
>
>
> Sub test_loop()
>
> For k = 1 To 5
>
> If k = 3 Then
> Next k
> Else
> MsgBox k
> End If
>
> Next k
> End Sub
>
> TIA
>
> Andy
>
>
Bookmarks