PDA

View Full Version : Adding Items to a ComboBox



Scott Duckworth
04-11-2002, 07:48 AM
How can I add items to a ComboBox at the project level? I would like to be able to add items to a ComboBox via VB code before the project is built. I currently have a VB program which modifies some of the project properties before a build is issued. I would like to add the items to a ComboBox during this phase.

Thanks

RobertDickau
04-11-2002, 08:01 AM
Assuming this is a Basic MSI project, you can edit the data in the ComboBox table of the ISM file with your VBScript code; something like the code in KB article Q103295, only permanent...

Scott Duckworth
04-11-2002, 08:29 AM
I am using Visual Basic. Below is a sample of the code that I use to modify the Version Number. Is there a way to add items to a combo box in this fashion?


'Create the ISWI Project object
Set objISWIProject = New ISWiProject

'Open the project file
objISWIProject.OpenProject "projectname"


'Set the Version Number
objISWIProject.ProductVersion = "1.2.3"

RobertDickau
04-11-2002, 01:35 PM
[Follow-up (of sorts) here (http://community.installshield.com/showthread.php?s=&postid=150053#post150053).]