Trying to practice using Subs with Subs.
This example isn't working, though:
Option Explicit
Sub Main()
Dim SubToCall As String
Select Case WeekDay(Now)
Case 1, 7: SubToCall = "Weekday"
Case Else: SubToCall = "Weekend"
End Select
Application.rn SubToCall
End Sub
Sub Weekend()
MsgBox "Today is a weekend"
End Sub
Sub WeekDay()
MsgBox "Today is a weekday, sucka!"
End Sub
This example isn't working, though:
Option Explicit
Sub Main()
Dim SubToCall As String
Select Case WeekDay(Now)
Case 1, 7: SubToCall = "Weekday"
Case Else: SubToCall = "Weekend"
End Select
Application.rn SubToCall
End Sub
Sub Weekend()
MsgBox "Today is a weekend"
End Sub
Sub WeekDay()
MsgBox "Today is a weekday, sucka!"
End Sub