Good Morning Everyone,
As i am learning VBA through Forums and Videos, able to write the below code and looking for the help although found several similiar post not able to grab them.
I need to save an excel file and the path is inside the Sheet1 Cell A3 ( Path Changes Based on requirement )
I am looking an excel to be saved in a path what is it in the Cell A3 Below the code have written i works fine i don't go with Cell path
i need it to be saved as ActiveWorkbook.SaveAs Filename: Sheets(1).Range("A3") & Format(Now(), "MM.DD.YYYY")
Sub Prep_InsCr_Balance()
Dim MyFile As String
MyFile = ActiveWorkbook.Name
Application.DisplayAlerts = False
Rows("1:2").EntireRow.Delete
Columns("A:A").Select
'Worksheets("NonClient Credit Balance").Range("A1:M1").AutoFilter Field:=1, Criteria1:="<>1"
ActiveSheet.Range("$A$1:$N$200000").AutoFilter Field:=1, Criteria1:="="
Worksheets("NonClient Credit Balance").Rows(3 & ":" & Worksheets("NonClient Credit Balance").Rows.Count).Delete
Worksheets("NonClient Credit Balance").AutoFilterMode = False
ActiveSheet.Range("$A$1:$N$200000").AutoFilter Field:=4, Criteria1:="=", Operator:=xlOr, Criteria2:="Customer Name"
Worksheets("NonClient Credit Balance").Rows(3 & ":" & Worksheets("NonClient Credit Balance").Rows.Count).Delete
Worksheets("NonClient Credit Balance").Rows(3 & ":" & Worksheets("NonClient Credit Balance").Rows.Count).Delete
Worksheets("NonClient Credit Balance").AutoFilterMode = False
ActiveWorkbook.SaveAs Filename:="\\Root\Folder1\Folder2\Folder3\" & Format(Now(), "DD-MMM-YYYY hh mm AMPM")
ActiveWorkbook.Close
End Sub
As i am learning VBA through Forums and Videos, able to write the below code and looking for the help although found several similiar post not able to grab them.
I need to save an excel file and the path is inside the Sheet1 Cell A3 ( Path Changes Based on requirement )
I am looking an excel to be saved in a path what is it in the Cell A3 Below the code have written i works fine i don't go with Cell path
i need it to be saved as ActiveWorkbook.SaveAs Filename: Sheets(1).Range("A3") & Format(Now(), "MM.DD.YYYY")
Sub Prep_InsCr_Balance()
Dim MyFile As String
MyFile = ActiveWorkbook.Name
Application.DisplayAlerts = False
Rows("1:2").EntireRow.Delete
Columns("A:A").Select
'Worksheets("NonClient Credit Balance").Range("A1:M1").AutoFilter Field:=1, Criteria1:="<>1"
ActiveSheet.Range("$A$1:$N$200000").AutoFilter Field:=1, Criteria1:="="
Worksheets("NonClient Credit Balance").Rows(3 & ":" & Worksheets("NonClient Credit Balance").Rows.Count).Delete
Worksheets("NonClient Credit Balance").AutoFilterMode = False
ActiveSheet.Range("$A$1:$N$200000").AutoFilter Field:=4, Criteria1:="=", Operator:=xlOr, Criteria2:="Customer Name"
Worksheets("NonClient Credit Balance").Rows(3 & ":" & Worksheets("NonClient Credit Balance").Rows.Count).Delete
Worksheets("NonClient Credit Balance").Rows(3 & ":" & Worksheets("NonClient Credit Balance").Rows.Count).Delete
Worksheets("NonClient Credit Balance").AutoFilterMode = False
ActiveWorkbook.SaveAs Filename:="\\Root\Folder1\Folder2\Folder3\" & Format(Now(), "DD-MMM-YYYY hh mm AMPM")
ActiveWorkbook.Close
End Sub
Last edited by a moderator: