It's not letting me edit the original post, so I will add this bit of code here. This is the code I have within my dictionary. It is where I declare the variables dict2 and dict3.
Option Private Module 'This is necessary so that these modules do not show up in the PPT Macro window.
Public dict2, dict3 As Object, Key, val 'Makes the dictionaries public so they can be accessed by other Modules.
Sub WarningInfo()
'This is the dictionary for the maximum expected hail size.
Set dict2 = CreateObject("Scripting.Dictionary")
Key = "No Hail": val = Array(vbNewLine & _
"No hail expected")
dict2.Add Key, val
Key = "0.25""": val = Array("Hail: Up to 0.25""")
dict2.Add Key, val
Key = "0.50""": val = Array("Hail: Up to 0.50""")
dict2.Add Key, val
Key = "0.75""": val = Array("Hail: Up to 0.75""")
dict2.Add Key, val
End Sub
Sub WindInfo()
'This is the dictionary for the maximum expected wind speed.
Set dict3 = CreateObject("Scripting.Dictionary")
Key = "35 mph": val = Array("Wind: Up to 35 mph")
dict3.Add Key, val
Key = "40 mph": val = Array("Wind: Up to 40 mph")
dict3.Add Key, val
Key = "45 mph": val = Array("Wind: Up to 45 mph")
dict3.Add Key, val
End Sub
I'm not sure how I would move that line out of the loop since the variable Ky will be different for each ComboBox, so it needs to loop through all iterations in order to get the value of Ky for dict2 (which should correspond to what the user selected in ComboBox2) and dict3 (should correspond to what the user selected in ComboBox3).