This paper reports the effects of various parameters on the attraction and repulsion of DNA to and from a silicon lance. An understanding of DNA motion is crucial for a new approach to insert DNA, or other foreign microscopic matter, into a living cell. The approach, called nanoinjection, uses electrical forces to attract and repel the desired substance to a micromachined lance designed to pierce the cell membranes. We have developed mathematical models to predict the trajectory of DNA. The mathematical model allows investigation of the attraction/repulsion process by varying specific parameters. We find that the ground electrode placement, lance orientation and lance penetration significantly affect attraction or repulsion efficiency, while the gap, lance direction, lance tip width, lance tip half-angle and lance tip height do not.