Loop is not working properly

I want to repeat the loop, variable times. But it is keep on repeating infinite times.
I have attached the macro below, Please take a look into it.
initial.kmmacros (3.3 KB)

hello @hiren4776 welcome to the forums. For the future it is easiest to help with a screen shot and some more info:

I downloaded your macro:

Instead of a For Each action, try a Repeat action.