Hi All
I am not very good with VBA and any help would be great.
I have 2 macro's that run reports for diff day eg:
Macro1 runs data as Date()-1
Macro2 runs data as Date()-2
What I want to do is use an if and then code to make this happen.
This is what I got so far but does not seem to work. Can't seem to get the procedure right to run the code:
This is the if code:
Sub MISExport()
If [yqryAppendPerformanceSummary].[Date] = vbMonday Then
acCmdRunMacro = MISExport3day
Else
acCmdRunMacro = MISExport1day
End If
End Sub
This is the procedure code:
Sub RunMIS()
Dim MisRun As String
MisRun.Run
End Sub
Any help with this will be great.
Thanks
Regards
Mark
I am not very good with VBA and any help would be great.
I have 2 macro's that run reports for diff day eg:
Macro1 runs data as Date()-1
Macro2 runs data as Date()-2
What I want to do is use an if and then code to make this happen.
This is what I got so far but does not seem to work. Can't seem to get the procedure right to run the code:
This is the if code:
Sub MISExport()
If [yqryAppendPerformanceSummary].[Date] = vbMonday Then
acCmdRunMacro = MISExport3day
Else
acCmdRunMacro = MISExport1day
End If
End Sub
This is the procedure code:
Sub RunMIS()
Dim MisRun As String
MisRun.Run
End Sub
Any help with this will be great.
Thanks
Regards
Mark