A
alishehzad
Dear Friends,
I am facing a strange problem. I used a code to process an Excel file.
The code has a part where it deletes the entire row with a blank entry
in any column. It is as follows:
****************** Code *****************
Del_Blank_Rows:
For J = 1 To 8
Columns(J).Select
On Error Resume Next
Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Next J
Return
******************************************
PROBLEM :
The problem is that if I call this code from within
a loop. It gets stuck on some of the files and runs on some of them.
However, if i do not use the loop and repeat the code for each file,
then it works fine.
I have tried it with several files. It always gets stuck on the same
files. But processes the rest of them correctly. And when I dont call
it from a loop. It processes all the files correctly.
Please Help me Out !! Thank you in advance for your help.
I am facing a strange problem. I used a code to process an Excel file.
The code has a part where it deletes the entire row with a blank entry
in any column. It is as follows:
****************** Code *****************
Del_Blank_Rows:
For J = 1 To 8
Columns(J).Select
On Error Resume Next
Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Next J
Return
******************************************
PROBLEM :
The problem is that if I call this code from within
a loop. It gets stuck on some of the files and runs on some of them.
However, if i do not use the loop and repeat the code for each file,
then it works fine.
I have tried it with several files. It always gets stuck on the same
files. But processes the rest of them correctly. And when I dont call
it from a loop. It processes all the files correctly.
Please Help me Out !! Thank you in advance for your help.