Folks,

I have a VSTO application that loads data from Excel into a SQL db. I have a
button click event sub that performs the data loading, taking parameters
from the Excel sheet.

Is there any reason I can't modify this to bypass the button (raise the
click event programatically) and simply have it start executing, fetching the
processing parameters directly from the SQL database rather than cells from
the spreadsheet? And then shut it down (close the spreadsheet) when finished,
and close the application? Does the spreadsheet need to be 'up' (visible) to
perform a sort step?

thanks!
--
Bob Sullentrup