I have a Word (2002) form, widely distributed throughout an organisation.
The form has a number of combo boxes, each of which contains greater than 25
items. I have therefore set up a macro with an array for each combo box hard
coded with the combo box items.
These items may change several times during the year. I need a method to
change the array values WITHIN THE MACRO without going into the code, as
changes will be made by someone who knows nothing about VBA.
Any ideas along with sample code would be appreciated, as I am a VBA novice.
Many thanks
Put the source data into an external format that is easy to edit. Flat text
files and Excel spreadsheets are both easy to work with from VBA.
To read a text file into an array --
Dim pFilenum as long
Dim pData() as string
pFilenum = freefile
open "MyFile" for input as #pFilenum
pData = split(input(lof(pFilenum),pFilenum), vbcr)
close pFilenum
>I have a Word (2002) form, widely distributed throughout an organisation.
> The form has a number of combo boxes, each of which contains greater than
[quoted text clipped - 8 lines]
> novice.
> Many thanks
Kiwi Pom - 08 Feb 2007 04:16 GMT
Thanks,
I'll give it a try.
> Put the source data into an external format that is easy to edit. Flat text
> files and Excel spreadsheets are both easy to work with from VBA.
[quoted text clipped - 20 lines]
> > novice.
> > Many thanks