Reference Cells In An Embedded Sheet

F

Fred Zuckerman

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
 
E

Edward Thrashcort

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
 
F

Fred Zuckerman

Edward Thrashcort said:
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

Thanks Eddie, what utility will allow the user to modify the choices? An
excel sheet seemed to be a simple, user friendly utility....
 
E

Edward Thrashcort

Can you rely on ALL you users having Excel in addition to Word?

Sorry, you will have to write a utility to edit the options!

Eddie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top