Advertisement
veronikaaa86

1. Day of Week

Jan 10th, 2022
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Sub Example()
  2. Dim days As Variant
  3.  
  4. days = Array( _
  5. "Monday", _
  6. "Tuesday", _
  7. "Wednesday", _
  8. "Thursday", _
  9. "Friday", _
  10. "Sunday", _
  11. "Saturday")
  12.  
  13. Dim n As Integer
  14. n = 90
  15.  
  16. If n >= 1 And n <= 7 Then
  17. Debug.Print days(n - 1)
  18. Else
  19. Debug.Print "Invalid!"
  20. End If
  21. End Sub
  22.  
  23.  
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement