Saving Current Excel File Path inside the cell

sg2209

Board Regular
Joined
Oct 27, 2017
Messages
89
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:

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

sg2209

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

Watch MrExcel Video

Forum statistics

Threads
1,122,228
Messages
5,594,931
Members
413,953
Latest member
Arthur1471

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