![]() |
File Manipulation
I have an Excel file named "Customer" in G:\Company folder.
Without opening this file in excel, I want to check it's first column cells values of every rows. I used to use a following module when I directly opend Customer Excel worksheet. How can I achieve the same result without opening Customer Excel sheet directly. Or any better idea? I know very little about file manipulation techniques. Thank you. Sub Paid() x =1 Do while Cell(x,1).Value < " " If Cells(x,1).Value = "Paid" Then Cells.Entirerow.Delete. x=x+1 Loop End Sub |
File Manipulation
Are you opposed to opening the file via code, deleting the "Paid" rows, then
closing the file in the same procedure? This would take less time than you could see it happen. "Jay" wrote: I have an Excel file named "Customer" in G:\Company folder. Without opening this file in excel, I want to check it's first column cells values of every rows. I used to use a following module when I directly opend Customer Excel worksheet. How can I achieve the same result without opening Customer Excel sheet directly. Or any better idea? I know very little about file manipulation techniques. Thank you. Sub Paid() x =1 Do while Cell(x,1).Value < " " If Cells(x,1).Value = "Paid" Then Cells.Entirerow.Delete. x=x+1 Loop End Sub |
File Manipulation
You will not be able to delete rows without opening the file.
"Jay" wrote: I have an Excel file named "Customer" in G:\Company folder. Without opening this file in excel, I want to check it's first column cells values of every rows. I used to use a following module when I directly opend Customer Excel worksheet. How can I achieve the same result without opening Customer Excel sheet directly. Or any better idea? I know very little about file manipulation techniques. Thank you. Sub Paid() x =1 Do while Cell(x,1).Value < " " If Cells(x,1).Value = "Paid" Then Cells.Entirerow.Delete. x=x+1 Loop End Sub |
All times are GMT +1. The time now is 02:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com