Created
February 11, 2020 05:27
-
-
Save wheeliechamp/123af4b6ae061b128ae2849330871279 to your computer and use it in GitHub Desktop.
月の日数を取得する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
月の日数を調べるには、翌月の初日の前日が調べたい月の最終日となることを利用して調べる(C6の日付の月の日数を表示する)。 | |
Private Sub CommandButton1_Click() | |
MsgBox Day(DateSerial(Year(Range("C6")), Month(Range("C6")) + 1, 0)) | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment