![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 117
|
Hi-
Private Sub CommandButton2_Click() If today = Tuesday Then MsgBox "OK" End If End Sub How do you write a code that tells what today's day is, so that if today is Tuesday, then a msgbox pops up? |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Quote:
If Weekday(Date,vbMonday) = 2 then or If Format(Date,"ddd") = "tue" then or If Format(Date,"dddd" = "tuesday" then |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 117
|
Thanks Juan
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|