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