JohnYingling, I would be careful with this. POster did not say once per instantiation, the y said ONCE. The clue here MAY be that they are asking to DELETE the line of Code, which implies (STRONGLY) they mean once -PERIOD.
JimCowan
This gets to be much more complex than it appears at first glance. It can be done, but you need to be VERY careful. Using the modules collection, you would statrt w/ the name of the module where the procedure is located. You can get the Names of each procedure in the module, and the number of lines in the procedure (in several flavors). So, within the module / procedure, you would need to check the original line number of the line you want to delete, and see if it was -in fact- the line you want to delete and -if so, delete it. Else just do nothing.
A (perhaps) safer approach would be to place some key/value in the registry immediatly after the line was executed, and check the registry for the key / value before executing the line and -of course- skipping the line and the registry entry if the registry entry already exists.
MichaelRed
m.red@att.net
There is never time to do it right but there is always time to do it over