function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Roy D.Roy D. 

need the macro to check for logon

All,

Before executing my Excel macro I need to check to see if the Salesforce Office add in is connected. Anyone have code to check so I don't get the runtime 1004 error?


Has anyone used the sendkey function to perform auto logon?

Thanks,

Roy
ClaiborneClaiborne

Whenever I want to try to program anything using Excel macros, I check out the code in the Sforce Excel connector. It performs all the basic functions like logging in, maintaining sessions, etc.

Just load the Excel connector and start browing its code.

Roy D.Roy D.

I'm talking about using the SalesForce Office Excell add in.  The add in hads a password lock so the code can't be viewed.

 

 

Roy

 

bouscalbouscal
Code:
 If Not (SFDCExcelAddin.CommandBarRelated.IsLoggedIn) Then
        SFDCExcelAddin.CommandBarRelated.Login
 End If

 
This was posted yesterday, appears to be what you're looking for: