CodePudding user response:
Try this code:Dim datInput As Date
DatInput=InputBox (" please enter the date (month, day, year) : ")
Dim intResult As Integer
IntResult=Weekday (datInput vbMonday)
MsgBox intResult
CodePudding user response:
Pop up with or object variable is not setThen if June 21 years use text input how to write?
CodePudding user response:
Code:Option Explicit
Private Sub Command1_Click ()
If Not IsDate (Text1. Text) Then
MsgBox "input error!"
The Else
Dim intResult As Integer
IntResult=Weekday (Text1, vbMonday)
MsgBox intResult
End the If
End Sub
Presentation:
Download address:
Link: https://pan.baidu.com/s/1vvPgjbDKRelwnBVO8TR2MA
The extracted code: 3 u1i
CodePudding user response:
The