Dylan Snyder
Registered User.
- Local time
- Today, 15:21
- Joined
- Dec 31, 2007
- Messages
- 89
Is it possible to run VBA code within a macro?
What i want to do is run one macro for certain days of the week and another macro for other days of the week. I could just stick the code in the button on the switchboard but I could see an overzealous user changing the switchboard and then the code is gone. I like the idea of the code within the macro itself so someone not familiar with VBA could alter it.
I tried putting something like
If Me.Today = "Monday" Then
DoCmd.RunMacro "Macro2"
ElseIf Me.Today = "Thursday" Then DoCmd.RunMacro "Macro2"
Else: DoCmd.RunMacro "Macro3"
End If
In the RunCode action of the Macro with no success.
i'm sure there is an easy fix, but I'm not seeing it. Any thoughts?
What i want to do is run one macro for certain days of the week and another macro for other days of the week. I could just stick the code in the button on the switchboard but I could see an overzealous user changing the switchboard and then the code is gone. I like the idea of the code within the macro itself so someone not familiar with VBA could alter it.
I tried putting something like
If Me.Today = "Monday" Then
DoCmd.RunMacro "Macro2"
ElseIf Me.Today = "Thursday" Then DoCmd.RunMacro "Macro2"
Else: DoCmd.RunMacro "Macro3"
End If
In the RunCode action of the Macro with no success.
i'm sure there is an easy fix, but I'm not seeing it. Any thoughts?