回答編集履歴
1
コードの修正
answer
CHANGED
@@ -24,7 +24,8 @@
|
|
24
24
|
Dim i As Long, stArea As String
|
25
25
|
|
26
26
|
'Dictionary生成
|
27
|
-
Set dicList = CreateObject("Scripting.Dictionary")
|
27
|
+
Set dicList = CreateObject("Scripting.Dictionary")
|
28
|
+
|
28
29
|
'シート「一覧」のリストを配列に格納
|
29
30
|
aryList = Worksheets("一覧").Range("A1").CurrentRegion.Value
|
30
31
|
|
@@ -43,9 +44,10 @@
|
|
43
44
|
End Sub
|
44
45
|
|
45
46
|
Private Sub cbArea_Change()
|
47
|
+
Me.cbCity.Text = ""
|
46
|
-
'dicListより選択した地域に対応するItem(カンマ区切りの市町村リスト)を
|
48
|
+
'dicListより選択した地域に対応するItem(カンマ区切りの市町村リスト)を
|
47
|
-
'Splitで配列にして
|
49
|
+
'取得して、Splitで配列にして cbCity.List に設定
|
48
|
-
Me.cbCity.List = Split(dicList(Me.cbArea.
|
50
|
+
Me.cbCity.List = Split(dicList(Me.cbArea.Text), ",")
|
49
51
|
End Sub
|
50
52
|
|
51
53
|
Private Sub UserForm_Terminate()
|