Eğer bugüne ait gün hafta içine denk geliyorsa "Hafta İçi", hafta sonuna denk geliyorsa "Hafta Sonu" şeklinde mesaj gösteren VBA kodudur.
Option Explicit
Private Sub HaftaIciVeyaHaftaSonuBilgisiniVer()
Dim gun As String
Select Case Weekday(Date, vbMonday)
Case Is <= 5: gun = "Hafta İçi"
Case Is > 5: gun = "Hafta Sonu"
Case Else: gun = "HATA"
End Select
MsgBox gun
End Sub