Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is supposed to loop through a range (move across the row then back
to the beginning of the next) and return every other row in a pop-up box. I'm getting an 'Else Without an If" error - additionally, is this the correct code for it? Thank you so much for your help! Sub CompanionProjectsValidate() Dim Str As String Str = "" Dim k, i As Integer If CompanionComplete.Value = True Then With Range("BK25:DG300") Range("BK27").Select Do While k < 20 For k = 0 To 19 If ActiveCell.Offset(0, k + 1) < "" Then Str = Str & ActiveCell.Offset(0, k + 1) & Chr(10) End If Next k ActiveCell.Offset(1, -19).Select Loop Else: GoTo 10 End If If Str = "" Then GoTo 10 Else: CompanionComplete.Value = False CompleteValidation.TextBox1.Value = Str CompleteValidation.Show End If 10 End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro looping error | Excel Discussion (Misc queries) | |||
Looping help please | Excel Programming | |||
Error after last object in the array when looping For...each | Excel Programming | |||
Looping | Excel Programming | |||
Strange looping behaviour and Error 400 | Excel Programming |