Hi All,
I have written a code that mainly copy's and paste's data between workbooks. This all works fine until I tried to format the font in a particular cell with code. I just cant seem to get my head around whats causing the problem as I use the same snippet of code twice in the same module. the first time it encounters the snippet of code to format the font it fails, but if i delete it and only leave in the second bit of format code it works fine. Hard to explain so I have posted my full code below and highlighted in red where the code runs into an error
The error i receive is "Run-time error '1004': Unable to set the Name property of the font class"
If I remove the name property it simply fails on the next line of code. If I remove the whole section the code runs including the identical code just below the offending bit of code.
I am new enough to VBA so maybe it is something simple i have overlooked. Or even any advice on how i could clean up this code would be appreciated.
Thanks in advance
Simon
Bookmarks