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
fryguyfryguy 

Excel Connector: Password variable in macro

I'd like to be able to kick off my query refresh "lights out" using sfQueryAll in a macro, but I still need to enter my password+token to run the query in a new Excel session. Is there a way to call the password+token in the macro so I don't have to enter it manually?

dontichdontich

I actually could use this too.  I was thinking about trying to send commands to the mouse and keyboard to have it done automatically, however I would rather not do this if I did not have to.

devisfundevisfun

Here's what I did:

 

Right-click on the loginForm userform and add this method to the VBA:

 

Private Sub UserForm_Activate()
    username.Text = ""
    password.Text = ""
End Sub

Except of course my Salesforce username and password are populated within the quotation marks.

 

I don't automatically click the Login button (which would be the line "Call CommandButton1_Click") since I use the connector for both live and test, however if you only use it for live then this line would work perfectly.

fryguyfryguy

Hi devisfun. My version of Connector (PE winter 11 off the excel-connector project site) is password protected so I can't get at any of the code or forms. Would you happen to know the password or has access to an unprotected version?

devisfundevisfun

I'm not sure if I'd get in trouble by telliing you exactly how to do this, so I'm going to be discreet:

 

Do a google search for "allinternalpasswords" as an Excel addin.