M
Michael
Hi everyone,
Say I have this VBA piece of code:
For JobNr = 1 To 25
Aline = 1
For Each mac In vehicleModel.Macros
If mac.Value <> 0 Then
Flag = 1
ARngSolution(JobNr, Aline).Value = mac.Value
With ARngSolution(JobNr, Aline)
.HorizontalAlignment = xlCenter
.NumberFormat = "#.##0"
End With
Aline = Aline + 1
End If
Next mac
For every "JobNr", a data row is written. Now, if the above condition,
i.e. (mac.Value<>0), is not satisfied, I don't want the data's row for
that "JobNr" to be left blank, but to go to the next "JobNr" and write
its related data's row if the condition is satisfied.
So, in a 25 runs, it might end up with 20 data's rows for example with
no blank row inbetween.
What should I add to let the above piece do so?
Thanks,
Mike
Say I have this VBA piece of code:
For JobNr = 1 To 25
Aline = 1
For Each mac In vehicleModel.Macros
If mac.Value <> 0 Then
Flag = 1
ARngSolution(JobNr, Aline).Value = mac.Value
With ARngSolution(JobNr, Aline)
.HorizontalAlignment = xlCenter
.NumberFormat = "#.##0"
End With
Aline = Aline + 1
End If
Next mac
For every "JobNr", a data row is written. Now, if the above condition,
i.e. (mac.Value<>0), is not satisfied, I don't want the data's row for
that "JobNr" to be left blank, but to go to the next "JobNr" and write
its related data's row if the condition is satisfied.
So, in a 25 runs, it might end up with 20 data's rows for example with
no blank row inbetween.
What should I add to let the above piece do so?
Thanks,
Mike