How to Get Ms Project File Name in String and Used it for Safe File

jeeshan

New Member
Joined
Feb 13, 2014
Messages
1
I have write it down this macro for variable look ahead filter i just want to make it more automated
I want that instead of user input the name of the project file in SDe string is their any funcation which can give me the name of the project file name automatically so my user dont put the file name, as this file safe in pdf format in a drive

thanks in Advanced if you help me for this
Sub lookahead()
ViewApply Name:="lookahead"
' Macro created by Dr Schon ©MyPrimavera.co.uk All rights Reserved
'SelectTaskColumn Column:="Text12"

Dim CopieNumber As Integer
Dim InputNumber As Long
Dim MyDate As Date
Dim Pe As Project
Dim SDe As String
Dim macroproject As Project


SDe = Loge

MyDate = InputBox("Please enter StatusDate as 22/11/2013")
InputNumber = InputBox("Please enter number of weeks ")
InputNumber = InputNumber * 7
SDe = InputBox("Please Enter Project Name")

MyDate = MyDate + InputNumber
'MsgBox (FileName)

FilterEdit Name:="AutoFilter", TaskFilter:=True, Create:=True, OverwriteExisting:=True, FieldName:="Start", Test:="is less than or equal to", Value:=MyDate, ShowInMenu:=True, ShowSummaryTasks:=False
FilterEdit Name:="AutoFilter", TaskFilter:=True, FieldName:="", NewFieldName:="Finish", Test:="is less than or equal to", Value:=MyDate, Operation:="Or", ShowSummaryTasks:=False
FilterApply Name:="AutoFilter"
SetAutoFilter FieldName:="% Complete", FilterType:=pjAutoFilterCustom, Test1:="is greater than or equal to", Criteria1:="0%", Operation:="And", Test2:="is less than", Criteria2:="100%"
DocumentExport FileName:="C:\Users\muhammed.khan\Documents\Update\" & SDe & " " & Format(Date, "dd-mm-yyyy")
End Sub
 

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.

Forum statistics

Threads
1,217,361
Messages
6,136,103
Members
449,991
Latest member
IslandofBDA

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
Back
Top