Hi again,
Okay am getting onwhere with this, basically the code makes Excel crash. I have been looking at the following links and it seems to be either a problem with CodeName or possibly with the company anti virus software (although the latter would do more than just crash Excel so I don't think this is the problem.
http://www.cpearson.com/excel/vbe.aspx
http://www.mrexcel.com/archive2/42500/49267.htm
http://www.vbaexpress.com/forum/show...=transfer+code
below are the attempts I have made at this code, all fairly similar, and all will insert the first line of code into the worksheet and then crash, either when the program moves to the next line of code, or for no apparent reason after a short delay even if the program is not advanced to the next line.
First Attempt (from mikerickson's code)
2nd attempt from first link given
3rd attempt, adapted from 2nd link
In the second link Tom Urtis provides a method for adfding code that bypasses the use of the codename, but I do not understand how this is working so have not tried it.
if anyone could help it would be greatly appreciated, just to clarify the problem, I want to transfer the code given at the end of my post at 12:15 (30/10/07, post 1844515) to a new worksheet that is created by the addin.
Thanks in advance for any adivce, I'm really lost on this.
PS realised I don't need to unprotect the sheet as it is not protected at this point, so ignore that line of code, Regards
Bookmarks