S
Swampy
Hi gang,
this seems like such a simple one, but buggered if I can get it t
work.
I have written some code;
Dim fname As Variant
Dim fname_date As Date
Dim msgbox_prompt As Variant
fname_date = Date
fname = "Export"
Application.ScreenUpdating = False
Windows("Awaiting review.xls").Activate
Sheets("Data").Select
Selection.AutoFilter Field:=2, Criteria1:="#N/A"
Selection.AutoFilter Field:=4, Criteria1:="0"
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Columns("B
").Select
Selection.Delete Shift:=xlToLeft
ActiveWorkbook.SaveAs fname
ConflictResolution:=xlLocalSessionChanges
Windows("Awaiting review.xls").Activate
ActiveSheet.ShowAllData
Sheets("Summary").Select
Application.ScreenUpdating = True
msgbox_prompt = "SR's waiting review (excluding created date <
days) exported to " & fname
MsgBox (msgbox_prompt)
Windows(fname).Activate
I have three issues,:
a
- It prompts that the file exists, do you want to overwrite it;
just want it to overwrite without asking
- The windows(fname).activate fails, but I think that is because th
save is working successfully
- how do I format the date so that I can save the fname wher
fname_date will be export_10Sept
this seems like such a simple one, but buggered if I can get it t
work.
I have written some code;
Dim fname As Variant
Dim fname_date As Date
Dim msgbox_prompt As Variant
fname_date = Date
fname = "Export"
Application.ScreenUpdating = False
Windows("Awaiting review.xls").Activate
Sheets("Data").Select
Selection.AutoFilter Field:=2, Criteria1:="#N/A"
Selection.AutoFilter Field:=4, Criteria1:="0"
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Columns("B

Selection.Delete Shift:=xlToLeft
ActiveWorkbook.SaveAs fname
ConflictResolution:=xlLocalSessionChanges
Windows("Awaiting review.xls").Activate
ActiveSheet.ShowAllData
Sheets("Summary").Select
Application.ScreenUpdating = True
msgbox_prompt = "SR's waiting review (excluding created date <
days) exported to " & fname
MsgBox (msgbox_prompt)
Windows(fname).Activate
I have three issues,:
a
- It prompts that the file exists, do you want to overwrite it;
just want it to overwrite without asking
- The windows(fname).activate fails, but I think that is because th
save is working successfully
- how do I format the date so that I can save the fname wher
fname_date will be export_10Sept