teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

追記

2021/11/09 06:30

投稿

mnbwqz
mnbwqz

スコア74

title CHANGED
File without changes
body CHANGED
@@ -7,7 +7,8 @@
7
7
  2021/01/09
8
8
 
9
9
  の3つの値で日付型にできると良いです。
10
+ またtextboxA入力後にチェックしていますが、
10
- また現在、日付でない値を入力した場合に、
11
+ 日付でない値を入力した場合に、
11
12
  フォーカスをtextboxAに戻すことができません。
12
13
  こちらの方法も教えていただけると助かります。
13
14
  よろしくお願いします。
@@ -23,4 +24,5 @@
23
24
  End If
24
25
  End If
25
26
  textboxA = CDate(textboxA)
27
+ End Sub
26
28
  ```

1

追記

2021/11/09 06:30

投稿

mnbwqz
mnbwqz

スコア74

title CHANGED
File without changes
body CHANGED
@@ -13,6 +13,7 @@
13
13
  よろしくお願いします。
14
14
 
15
15
  ```VBA
16
+ Private Sub textboxA_AfterUpdate()
16
17
  If Not (IsDate(textboxA)) Then
17
18
  If Len(textboxA) = 8 Then textboxA = Format(textboxA, "@@@@/@@/@@")
18
19
  If Not (IsDate(textboxA)) Then