Using VBA to Write VBA code
Chip / Anyone
The problem at the beginning of this thread was a "subscript out of
range error" on the following line of code:
With ActiveWorkbook.VBProject. _
VBComponents(shtNewNotesSheet.Name).CodeModule
Chip suggested changing .name to .codename which seemed to work for a
short while. On testing I got other error messages which was to do
with the VBproject being protected, and hence no code could be added
to it. I have now resolved that problem using some SendKeys code
obtained from the newsgroup. HOWEVER I am now getting the same error
noted above whether I use .name or .codename.
Can anyone help me please?
|