4
$\begingroup$

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

$\endgroup$
3
  • 1
    $\begingroup$ 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. $\endgroup$ Commented Mar 2, 2014 at 16:23
  • $\begingroup$ 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. $\endgroup$ Commented Mar 2, 2014 at 16:25
  • $\begingroup$ @SjoerdC.deVries - I'll try CellAutoOverwrite. That's yet another thing I didn't know about $\endgroup$ Commented Mar 2, 2014 at 16:41

1 Answer 1

2
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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