Re: Updating list from macro using form by Jezebel
Jezebel
Fri Apr 15 23:34:28 CDT 2005
Writing VBA to modify other VBA is tricky, and extremely questionable from a
security point of view. Several alternatives:
1. Store the values in a DocVariable, eg as a delimited array. Your main
macro reads that list when it runs. Write a separate macro to edit the list,
eg in a UserForm.
2. Store the values in a Document property. User edits the list using File >
Properties > Custom. Pretty cludgy, but might be acceptable if the list is
not very long and doesn't change very often.
3. Store the values in a separate file, which the user can edit directly.
File format doesn't much matter: Word, Excel, plain text, etc. Plain text is
simplest to read at the VBA end.
"Wylie C" <WylieC@discussions.microsoft.com> wrote in message
news:F923D336-F63A-4ABC-965A-5AAFD36BED3A@microsoft.com...
>I have a dropdown list box within a Word 2000 table. When the user clicks
>on
> the field, the list of values is propegated with values listed in the on
> click event macro.
> I would like the user to be able to edit the macro's list of values
> without
> requiring them to know how to use the VBA editor. Is it possible to use a
> user form to get those values from the macro and allow the user to edit
> the
> values and save those changes back to the macro? If so, I need some help
> in
> the process and linking the form fields to the macro list. Is there a
> better
> way?
>
> Thank you.