R
Risky Dave
Hi,
I have a (quite complex) workbook with a considerable amount of code behind
it.
One macro copies the content of various sheets in the workbook to a new
temporary sheet moves that sheet to a new workbook, renames the new workbook
and deletes the temporary sheet in the source workbook.
When this macro (called "Extract") runs, the path to all other macros in the
source workbook are being pointed at the newly created workbook meaning that
I need to go into the Macros properties in XL and reset tham back to the
original workbook. Given that there is some 40-odd macros in the book, this
is completely impractical (it's also impossible for me to ask my users to do
this every time they run Extract).
Having played with the code, the following are the lines that are
re-directing the macros:
' copy extract to a new sheet
Sheets("Extract").Select ' this is the temp sheet in the source workbook
Application.CutCopyMode = False
Sheets("Extract").Move
Can someone please explain why this has started to happen (I have been using
this code for a couple of months without any problems - it has only started
to happen in the last week) and - more importantly - how do I fix it?
TIA
Dave
I have a (quite complex) workbook with a considerable amount of code behind
it.
One macro copies the content of various sheets in the workbook to a new
temporary sheet moves that sheet to a new workbook, renames the new workbook
and deletes the temporary sheet in the source workbook.
When this macro (called "Extract") runs, the path to all other macros in the
source workbook are being pointed at the newly created workbook meaning that
I need to go into the Macros properties in XL and reset tham back to the
original workbook. Given that there is some 40-odd macros in the book, this
is completely impractical (it's also impossible for me to ask my users to do
this every time they run Extract).
Having played with the code, the following are the lines that are
re-directing the macros:
' copy extract to a new sheet
Sheets("Extract").Select ' this is the temp sheet in the source workbook
Application.CutCopyMode = False
Sheets("Extract").Move
Can someone please explain why this has started to happen (I have been using
this code for a couple of months without any problems - it has only started
to happen in the last week) and - more importantly - how do I fix it?
TIA
Dave