質問編集履歴

2

エラー部分の記載

2023/05/18 03:26

投稿

taroooo
taroooo

スコア16

test CHANGED
File without changes
test CHANGED
@@ -9,7 +9,8 @@
9
9
  ### 発生している問題・エラーメッセージ
10
10
 
11
11
  エラーメッセージ
12
+
12
- 実行時エラー1004 アプリケーション定義またはオブジェクト定義のエラーです。
13
+ 実行時エラー1004 アプリケーション定義またはオブジェクト定義のエラーです。.Add Type:=~の部分を実行すると、エラー起きます。
13
14
 
14
15
  ### 該当のソースコード
15
16
 
@@ -33,9 +34,9 @@
33
34
 
34
35
  With Range("E" & u).Validation
35
36
  .Delete
36
- .Add Type:=xlValidateList, _
37
+ .Add Type:=xlValidateList, _  →ここでエラーおきます。
37
38
  AlertStyle:=xlValidAlertStop, _
38
- Formula1:=Join(dropDownValues, ",")
39
+ Formula1:=Join(dropDownValues, ",") 
39
40
 
40
41
  '赤枠にする
41
42
  Range("E" & u).Borders.Color = RGB(255, 0, 0)

1

AlertStyle:=xlValidAlertInformation→AlertStyle:=xlValidAlertStopにプログラムを修正しています。

2023/05/18 02:58

投稿

taroooo
taroooo

スコア16

test CHANGED
File without changes
test CHANGED
@@ -34,7 +34,7 @@
34
34
  With Range("E" & u).Validation
35
35
  .Delete
36
36
  .Add Type:=xlValidateList, _
37
- AlertStyle:=xlValidAlertInformation, _
37
+ AlertStyle:=xlValidAlertStop, _
38
38
  Formula1:=Join(dropDownValues, ",")
39
39
 
40
40
  '赤枠にする