Sorry everyone, I have been busy at work and have only just checked this thread again. I will and try and answer the questions raised.
Firstly Barbola,
You are correct after, you have typed the comboboxes (MS Forms 2.0 version) name and the . a list of methods and properties pops up and AddItem is still not there!
But if you press Enter you will see that additem is capitalised to AddItem (if you did not type it correctly to start with that is. By the way I find this a very useful indicator to see if a method maybe supported when using VB and VBA) so it seems to have be recognised and if you finish typing the line, so you have something like this
Code:
Private Sub cmdFill_Click()
ComboBox1.AddItem "Apples"
End Sub
You should find it executes fine, if not get back to me.
Tony,
I am not sure exactly what sort of information you are after, but to get the help file for the MS Forms 2.0 Combo Control AddItem method hi-light AddItem and Press F1 for help, you should get the option of selecting either the Access or MS Forms 2.0 help file, select MS forms 2.0 and click the Help button, up should pop a help page on the AddItem method. If you do not get the option of which type to select make sure you have Microsoft Forms 2.0 Object Library select in references (Tools menu)
If you still can not get the help files (sometimes links are missing) open Excel and press Alt+F11 to get the VBA editor then add a user form and drop a combobox onto it, this is by default a MS Forms 2.0 version, you will find there a lot more properties listed for it when you use it within the Excel VBA design environment then there are in the Access VBA environment, but the ones I have tried all still seem to work fine.
I do not know why Access and Excel use different version of the combobox and I seem to remember that other controls are also subtlety different, also I do not know if the versions used in Word are different again (I rarely program in Word). Remember you can always add the control you are after by using the insert ActiveX Control from the Insert menu, as long as you know which library the control is in and where the file containing the library is located.
Also make sure if you are running the application on a different computer that it has the correct version of the required libraries. DLL library conflicts can be a real problem when deploying applications and for this reason I try use the smallest number of libraries and keep to using the most popular controls to avoid problems.
I always check the references before I start programming to see if all the libraries I need are selected, and I also use the object browser to find out information about the libraries. You can get the Object Browser to display by pressing F2 in the VBA environments (Same in Access and Excel!) and it is excellent when you are working with unfamiliar libraries or just can not find the property, method or event you are looking for.
I hope this answers some of you questions, if not get back to me,
Matt