function comhandle = comserver(h)

persistent apphandle;
 
% Need to prevent clearing of apphandle since a "clear classes"
% will clear the com handle before it has been properly disposed
% of by the ExcelSource object deletion listener
mlock

% Mimick static properties
% General idea is to only open one remote Excel session 
if isempty(apphandle) || ~ishandle(apphandle) 
    apphandle = actxserver('excel.application');
end
comhandle = apphandle;
