Group: microsoft.public.word.vba.general
From: IdontWantSpam@nospam.net (Edward Thrashcort)
Date: Friday, November 16, 2007 5:47 PM
Subject: Re: Reference Cells In An Embedded Sheet

Fred

Don't use a sledge-hammer to crack a nut!!

Simply store the values in document variables which the macro can read every
time it opens. Then give the user a utility to modify those variables.

Eddie

> *From:* "Fred Zuckerman"
> *Date:* Thu, 20 Sep 2007 21:18:47 -0700
>
> Hello All,
> I have a combo box in a word doc.
> In the open event of the doc, I populate the choices for the combo box as
> follows:
>
> Private Sub Document_Open()
> cboTeam.AddItem "Team1"
> cboTeam.AddItem "Team2"
> cboTeam.AddItem "Team3"
> End Sub
>
> This seems to work fine. However, in the future, if the users want to
> add/edit/delete those choices I don't want them to edit vba code. So,
> instead, I'd like to embed an excel sheet in the doc. The sheet could
> contain the valid choices in column A. What vba code will read column A
> of the sheet and populate the combo box appropriately? I imagine some
> sort of a loop that cycles through cells A1, A2, A3, A4, etc until it
> finds the first empty cell.
>
> Thanks,
> Fred Zuckerman
>
>
>

Safety Articles | Usenet Groups | Usenet News | Bluegrass