Quantcast
Channel: VBA If Else within For Next Loop - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Mikku for VBA If Else within For Next Loop

This will work:Sub TestForIfElse() Dim Counter As Integer Dim i As Integer For i = 1 To 5 Counter = i If Counter > 3 Then Exit For End If Next iEnd Sub

View Article



VBA If Else within For Next Loop

I need a VBA If Else statement within a For Next loopI have tried various arrangements of the statements, but they all error out.Sub TestForIfElse() Dim Counter As Integer Dim i As Integer For i = 1 To...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>