Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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
1  
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 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 at 16:25
    
@SjoerdC.deVries - I'll try CellAutoOverwrite. That's yet another thing I didn't know about –  George Wolfe Mar 2 at 16:41

1 Answer 1

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

 
discard

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.