BogginsDad
New Member
- Joined
- Apr 25, 2020
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Have spent an hour looking for an answer on this and have tried various options... My loop works perfectly when I use number 4 but doesn't when I reference cell H2 (on the only sheet in my workbook and from where I trigger the Macro) I want the user to be able to define via H2 how many times they'd like the loop to run. I'd also like to write back to cell H3 each time the loop has run. Effectively H2 has the target number of loops and H3 will have the actual number of loops run. I'd also like to add a button to Sheet 1 to break this loop if required.
Dim i As Integer
i = 1
Do While i < 4 'H2
Application.Wait (Now + TimeValue(Range("L2").Text))
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
i = i + 1
Loop
Thanks in advance.
Dim i As Integer
i = 1
Do While i < 4 'H2
Application.Wait (Now + TimeValue(Range("L2").Text))
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
i = i + 1
Loop
Thanks in advance.