Jan 9, 2014 at 6:37 PM
Edited Jan 9, 2014 at 6:38 PM

I have below code at the end of my AutoOpen.

XlCall.Excel(XlCall.xlcMessage, true, "SUCCESS! Addin loaded successfully");

But the message doesn't stay in the status bar. It seems to get displayed and immediately cleared.

I have exact same code with XLW and the message stays there until it gets cleared. May be excel-dna is clearing this message?

Can someone let me know how do I make the message stay there?

Jan 13, 2014 at 6:51 PM
Hi Sumeet,

I think you are right. Excel-DNA displays the "Registering ..." message when it starts loading, and clears it after loading the add-in (thus after your AutoOpen runs).

I think you could use the ExcelAsyncUtil.QueueAsMacro(...) mechanism to set up code to run after loading is complete, in which you can then set the message. (You'd have to call ExcelAsyncUtil.Initialize() before this).)

When do you plan to clear the message you display?

Marked as answer by sumpan on 1/16/2014 at 7:43 AM
Jan 16, 2014 at 2:45 PM
Hi Govert,

Thanks for the reply. ExcelAsyncUtil.QueueAsMacro(...) did the trick.

With XLW, I observed that whoever sets a message on the status bar after me, clears out my message.
So I am under the impression that I am not hijacking the status bar.

Am I wrong?