HeSaidJoe, try this code:
Place a listview control and a command button on a form and use the following:
You will be able to add the first listitem, and get an error on the second listitem.Code:Dim tmpItem As ListItem Private Sub Command1_Click() ListView1.ListItems.Clear Set tmpItem = ListView1.ListItems.Add(,"A102","A102") Set tmpItem = ListView1.ListItems.Add(,"102","102") End Sub
This error is because of the Key value used for the second listitem, which contains all numeric digits. This is the behaviour I am referring to.
Bill Crawley and Shrogg, thanks for your replies. I am presently using the same work around, but I wanted to know if there is any better way. I guess there isn't.
.





Reply With Quote