Saving Current Excel File Path inside the cell

sg2209

Board Regular
Joined
Oct 27, 2017
Messages
102
Office Version
  1. 2016
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
 
Last edited by a moderator:

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

sg2209

Board Regular
Joined
Oct 27, 2017
Messages
102
Office Version
  1. 2016
I Solved it myself , thank you who viewed it :)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,155
Messages
5,835,697
Members
430,379
Latest member
QCLAN

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top