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
Allen628Allen628 

How to call the sforce connector command in Excel Macro

Hi, friends

 

I am using excel connector to import leads information into SFDC.

I designed an excel template for our marketing staff to fill in and then upload to SFDC for them.

In the excel template which I designed, I write many excel macros with VB and simply we need to click connector to insert new leads or update existing leads.

 

May i know how to integrate the connector command"insert new rows" or "update selected cells" in my macros? or be less complicated, how can i call the connector command in my macro?

As we know, connector is also wirtten by VB and locked with password to view.

 

Thanks to anyone who can provide the answer.

Allen

excelconn_fanexcelconn_fan

Allen,

 

To insert rows, the ID field must say "new".  In your macro, select the sheet and add the following:

 

Range("A3").Select
Application.Run ("sfInsertRow")

 

To update records, highlight the rows to update and use:

 

Application.Run ("sfUpdate")

 

other functions include sfDelete, sfQuery (to run "Query Table Data"), sfLogout, etc.

 

-bill

 

Riley BRiley B

Thank you, This was very helpful.

i would like to expand on this question, once a function has been called and runs, is there a way to auto acknowlege any dialog box that may pop up [ok / continute / cancel]. either so it's always ok, or better yet based on a value in another cell? if not populated choose cancel, if rows exist then OK

 

 

excelconn_fanexcelconn_fan
I haven't tried to auto-respond to the dialog boxes.  I doubt there is a way to do it, but I find it helpful to force my users to respond to those.  For example, "you are about to insert 100 rows...", I want them to approve that just in case they ran the macro by mistake.