Hi.
Sorry for the bad thread title but I didnt know what else to write
Anyway, here is my problem.
I have a macro that runs through a bunch of external .xls files based on a list in my primary workbook.
What I want to do happen is that if I put an "x" in the adjacent cell of my list, the macro should change a cell value and then go to the next item in the list.
My code is becoming quite big so I wont post all of it but I think this will be enough.
The blablablabla lines shows where I have omitted some code
![]()
Do 'Defines the name of the file for running external macro Dim sName As String sName = ActiveCell.Value blablabla If ActiveCell.Offset(0, -1).Value = "x" Then Sheets("S01-01-0103").Select Range("B3").Select ActiveCell.Offset(0, Sheets("Macros").Range("G1") + 1).Select ActiveCell.Offset(-1, 0).Select ActiveCell.Value = sName Sheets("Macros").Range("G1") = Sheets("Macros").Range("G1") + 1 Sheets("Macros").Select Range("F1") = Range("F1") + 1 ActiveCell.Offset(1, 0).Select Else End If blablalblalbla 'Loops this macro until the list is empty Loop Until IsEmpty(ActiveCell.Offset(0, 0))
All I want to know is what do I write after
for the macro to restart, in other words, go back to "Do".![]()
ActiveCell.Offset(1, 0).Select
I have everything else working fine,











LinkBack URL
About LinkBacks

Register To Reply
Bookmarks