Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This may seem like is a trivial annoyance, but it really is a control object "convenience of use" issue. Example: I want to use a popup menu to determine which Excel worksheet I take data from, as shown below (I'm using ExcelLink to acquire a list of worksheets from the currently active workbook):

enter image description here

Works great, but, if I make it an initialization cell so it will get a refreshed list and be ready to use as a control object, the next time I open the notebook and evaluate a function I get the following:

enter image description here

and I have to delete the old control object. Is this preventable?

When I created a test case that didn't use ExcelLink, responding to Sjoerd's request, the problem went away:

enter image description here

share|improve this question
George, could you post actual code instead of an image? Also using commands that would actually work without commercial packages (like the ExcelLink I presume you're using) would be advantageous. – Sjoerd C. de Vries Mar 2 '14 at 16:23
Probably adding CellAutoOverwrite->True to your output cell would work. BTW in the image above it doesn't look like the cell is an initialisation cell. There's no small 'I' in the cell bracket. At the moment I have difficulties replicating your problem. – Sjoerd C. de Vries Mar 2 '14 at 16:25
@SjoerdC.deVries - I'll try CellAutoOverwrite. That's yet another thing I didn't know about – George Wolfe Mar 2 '14 at 16:41
up vote 2 down vote accepted

I don't understand why, but If I put the ExcelLink Function outside of PopupMenu, the problem goes away, as seen below:

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.