Thanks for your help. I got it working now. I have a tool strip drop down menu for each zip code they want to add to their favorites and I'm trying to add the functionality to a "delete favorite" button. I've been looking into it, and There's a ToolStripMenuItem.Add, but there isn't a remove. Any ideas on how I'd do that? I am also saving their favorite zip codes in My.Settings as they add them, and I'm not totally sure that my method for deleting from there will work either. It says you have to reference the items on the list by number, as if they're in some kind of array, but I don't know how to do that, since I don't know what zip codes they'll have and in what order. Here's the code for something I tried. Not sure if this will do it.
Code:
PrivateSub DeleteFavLocation_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteFavLocation.Click
If ZIP.Text <> NothingThen
IfMy.Settings.FavoriteZipOne = ZIP.Text Then
Dim DelFindOne As Array = ChooseFavLocation.DropDownItems.Find(My.Settings.FavoriteZipOne, 1)
My.Settings.FavoriteZipOne = ""
ChooseFavLocation.DropDownItems.Remove(DelFindOne(1))
ElseIfMy.Settings.FavoriteZipTwo = ZIP.Text Then
Dim DelFindTwo As Array = ChooseFavLocation.DropDownItems.Find(My.Settings.FavoriteZipTwo, 1)
My.Settings.FavoriteZipTwo = ""
ChooseFavLocation.DropDownItems.Remove(DelFindTwo(1))
ElseIfMy.Settings.FavoriteZipThree = ZIP.Text Then
Dim DelFindThree As Array = ChooseFavLocation.DropDownItems.Find(My.Settings.FavoriteZipThree, 1)
My.Settings.FavoriteZipThree = ""
ChooseFavLocation.DropDownItems.Remove(DelFindThree(1))
EndIf
EndIf
EndSub
Bookmarks