When i create a new worksheet by copying an existing worksheet of the workbook i need to run a macro which sets values for a worsheet in a different workbook.I used the following vb code,
I have two problems with this code.Please Login or Register to view this content.
(1)At line 4 the value of m_lngNSheets is "0" which must be "38" based on my workbook count.
(2)I get a run-time error '1004' (Application-defined or object-defined error) at line 15.
Can anyone help me with this code..
Bookmarks