yourtwizted
New Member
- Joined
- Feb 7, 2020
- Messages
- 12
- Office Version
- 365
- Platform
- Windows
- MacOS
Hey guys,
so at work i occasionally have to send a email to some bigger bosses and they like the text to have a time based on a 15 minute standard,
i attempted to do something like
and so on until the end of my shift, i get an error at the end stating "Block If without End If" the following is the end of the coding i have
is there an easier way to do this? (my email generation works already i just need to fix or improve the time issue)
so at work i occasionally have to send a email to some bigger bosses and they like the text to have a time based on a 15 minute standard,
i attempted to do something like
Rich (BB code):
Dim Time as string
Dim Time1 as string
If Time > TimeValue("06:00:00") and Time < TimeValue("06:14:59") Then
Time1 = "07:00:00"
Else
If Time > TimeValue("06:15:00") and Time < TimeValue("06:29:59") Then
Time1 = "07:15:00"
Else
and so on until the end of my shift, i get an error at the end stating "Block If without End If" the following is the end of the coding i have
Rich (BB code):
If Time > TimeValue("22:45:00") and Time < TimeValue ("22:59:59") Then
Time1 = "23:45:00"
Else
MsgBox ("No Time Found")
End If
is there an easier way to do this? (my email generation works already i just need to fix or improve the time issue)