i am having trouble with my do until function in my VBA. For some reason it does not go into the next row and doesnt stop when the column cell is empty. please any help will do.
Sub rollforward()
Dim myfile As String
Dim myfolder As String
myfolder = "\\tps-san\Share\ Accounting\Inventory\2019 Inv\Inventory Rollforward\11 Nov"
myfile = Dir(myfolder & "\*.xlsx")
Do While myfile <> ""
Workbooks.Open Filename:=myfolder & "\" & myfile
myfile = Dir
Loop
Workbooks("Beg Balance").Activate
Dim i As Integer
i = 17
Do Until IsEmpty(ActiveCell)
If Cells(i, 2) = "0011" Or "0021" Or "0705" Or "20" Or "21" Then Cells(i, 2) = "0020"
If Cells(i, 2) = "9999" Then Cells(i, 2) = "9011"
If Cells(i, 2) = "9650" Or "9599" Or "9972" Or "9940" Then Cells(i, 2) = "9031"
If Cells(i, 2) = "9230" Or "9059" Then Cells(i, 2) = "9059"
If Cells(i, 2) = "4212" Or "7212" Then Cells(i, 2) = "9212"
If Cells(i, 2) = "9214" Then Cells(i, 2) = "9214"
If Cells(i, 2) = "9408" Then Cells(i, 2) = "9415"
If Cells(i, 2) = "9916" Then Cells(i, 2) = "9500"
If Cells(i, 2) = "9215" Then Cells(i, 2) = "9535"
If Cells(i, 2) = "9055" Then Cells(i, 2) = "9737"
If Cells(i, 2) = "9706" Or "2037" Then Cells(i, 2) = "9770"
If Cells(i, 2) = "7901" Or "7903" Then Cells(i, 2) = "9905"
If Cells(i, 2) = "9262" Then Cells(i, 2) = "9915"
Loop