none
Equivalent for MAIN() function RRS feed

  • Question

  • I have an EXCEL VSTO project using the latest bits. I execute SQL queries on 6 sheets. I want to authenticate the user before any of these queries execute. It looks like the sheets load from left to right, but the SQL query that seems to get hit first is on the 4th sheet not the 1st. Where can I place code that I can guarantee will run before any other code? It looks like my custom ribbon is the last code to execute.
    Wednesday, April 10, 2013 4:48 PM

Answers

  • add codes into ThisDocument.cs file->ThisDocument_Startup method,

    You can get more help from below article:

    Events in Office Project 



    If my post is helpful,please help to vote as helpful, if my post solve your question, please help to make it as answer.

    • Marked as answer by jeffki Monday, April 15, 2013 3:51 PM
    Sunday, April 14, 2013 6:45 AM

All replies

  • thisaddin.cs -> startup method
    Thursday, April 11, 2013 4:18 AM
  • Can you be a little more specific. I don't have a thisaddin.cs file. Are you saying that if I did and added a method called startup I would have what I want? This is a document level addin.
    Thursday, April 11, 2013 3:25 PM
  • add codes into ThisDocument.cs file->ThisDocument_Startup method,

    You can get more help from below article:

    Events in Office Project 



    If my post is helpful,please help to vote as helpful, if my post solve your question, please help to make it as answer.

    • Marked as answer by jeffki Monday, April 15, 2013 3:51 PM
    Sunday, April 14, 2013 6:45 AM