Thread: Global session
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alvin Alvin is offline
external usenet poster
 
Posts: 19
Default Global session

I have a global variable declared as "Public cqSession As Session" On the
worksheet I have a button which when clicked connects to Rational Clearquest
and executes a query. within the button it connects using :
Set cqSession = CreateObject("CLEARQUEST.SESSION")
cqSession.UserLogon UserName, PassName, "CSR", AD_PRIVATE_SESSION, "CSR_Live"

This connection/logon takes a long time to process each time the button is
pressed.
Is there anyway I can do the connect/logon the first time the button is
pressed and leave the connection open until the spreadsheet is closed?