Hi, i spent the last 6 months developing an excel file that basically just access a database and performs operations with the help of active x objects here and there but im getting some problems with certain objects at certain times....... i think these are all actually related to a single combobox and hopefully 1 fix will fix it all......
i need to describe some events that are happening to give you a little picture....
when the workbook opens a certain sheet is made active which contains a single combobox, this combobox is filled with a list retreived from a database and then thats usually it until the user selects an item. the first problem i get is there is what looks like a combobox appear near the top of the screen (like a duplicate of the one on the sheet) with an item in it and this seems to prevent anything running in vba, its a ghost or clone or something and its causing problems........ if i click on it it will try loading something and nothing happens and it just disapears (i guess it is trying to load the selected items data from the database) then i can refresh the sheet with a refresh button i have but the code fails when setting the combo.List to the array i setup, i get an error message saying 'Permission Denied' and it wont populate. the array is populated ok, the combobox list proprty has an array of (0 to -1, 1 to 0) at this point.....
any ideas?
i know activex (especially comboboxes) have lots of internal problems regarding staying 'In Contact' with excel and i have gotten around most problems but this one stumped me and google is not helping , most people get this error after using the listrange property but i never use this and i only use AddItem if the array is empty..............
(Lightbulb Idea) if this combobox has an item from the previous session that was put there using AddItem, will trying to set the list property be a problem??????
Note i am using combo.Clear anytime i change this comboboxes data... however i noticed even after this it still has a list that is NOT empty.....it has the weird array setup (0 to -1, 1 to 0)......
Thanks
Paul
Bookmarks