Delete Rows

S

scottymelloty

Managed to get it to do what i want now all i did was add a few of line
that ive put in Bold to the original code i had working before


Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
FOR I = 1 TO 4
WORKSHEETS(I).ACTIVAT
LastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "D").Value = blank Then
Rows(RowNdx).Delete
End If
Next RowNdx
NEX
Sheets("Sheet2").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\evt_test.csv", FileFormat:= _
xlCSV, CreateBackup:=False
Sheets("Sheet3").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\mkt_test.csv", FileFormat:= _
xlCSV, CreateBackup:=False
Sheets("Sheet4").Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\SEL_TEST.csv", FileFormat:= _
xlCSV, CreateBackup:=False

End Sub


Thanks for the hel
 
T

Tom Ogilvy

If you want to respond to prompts everytime you run it after the first time,
you like repetitious code, and you don't mind renaming the current workbook
to a CSV file (and losing any changes not saved before running the macro),
then I guess you have a solution.
all i did was add a few of lines

Which 3 people took time to provided you with.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top