I would set a breakpoint and debug. What I'm assuming what's happening is Label11's text isn't matching with a country in the dictionary, even though it seems as though it should. But set up a breakpoint and check if the IF statement gets fired. Alternatively you could add an else and do something along these lines:
Code:Dim count As New Countries If count.ContainsKey(Label11.Text) Then PictureBox16.Image = count(Label11.Text) Else MessageBox.Show(Label11.Text & " isn't a country in my dictionary.") End If




Reply With Quote