+ Start a Discussion

Batch Insert example in VB 6 or VBA?


Can anyone help me out with a good example of a batch insert call in VB 6 or VBA?  Also, code to control the insert call in sizes of 200 would really help.



Ron HessRon Hess

some (lots of) VBA code here to do batch inserts, download the add-in, install it and open the VBA environment within Excel,

look for the sub insert_range() in the Module "s_force" 



you will have to rip out a bunch of stuff to simplify the code, much of this code is spent on working with cells and ranges, this may not be interesting (or too much work) if you are using Access or Word...


Also, the VB6 code I posted in Ron's "sforce Connector: new version 5.40" thread has some logic for Batch Inserts. I believe that the batch part is disabled, but it should be easy enough to reenable by letting it build an array of objects instead of creating them one at a time.