The word "Me" refers to the userform itself, and the fact that you're getting an error there makes me think you may have put Greg's code into a regular macro module, instead of putting it in the code window of the userform. Only the three-line macro CallFillStateDD should be in a regular module.
For reference, the expression Me.ListBox1.Clear removes any items that are already in the listbox, in preparation for filling it with other state abbreviations.
On Mon, 15 Dec 2008 13:09:01 -0800, hedbeb <hedbeb[ at ]discussions.microsoft.com> wrote:
[Quoted Text] >Thanks Jay, this helped with the initial question but when creating a >UserForm ListBox and the associated macro, what does Me.ListBox1.Clear >mean? It keeps rejecting the on the word "Me"? > > >-- >Thanks, > >Brad > > >"Jay Freedman" wrote: > >> hedbeb wrote: >> > Does anyone know if it's possible to build logic into a drop-down >> > list that says: based on what chosen in "drop-down list #1" it >> > manipulates what's available to choose in "drop-down list #2"? >> > Specifically, I want to have 3 drop-down lists and as you make your >> > selection in the first two, it narrows the available choices in the >> > 3rd drop-down list. >> > >> > If anyone has done something like this please let me know. >> >> See http://gregmaxey.mvps.org/Linked_DropDown_Fields.htm.>> >> -- >> Regards, >> Jay Freedman >> Microsoft Word MVP FAQ: http://word.mvps.org>> Email cannot be acknowledged; please post all follow-ups to the newsgroup so >> all may benefit. >> >> >>
|