I received a Microsoft Visual Basic Error at run-time which read "You must
select a shape". It was a warning prompt and it did not highlight a line of
code when I attempted to debug.
When the prompt is cleared the code continues to run. However, the problem
is that the code stops.
My Excel VBA code is performing a copy of worksheets from one workbook to
another.
After examining the workbook where the problem appeared to occur, I
discovered that a chart in the workbook had the focus or was left selected by
a user. There is also a pivot table on the same worksheet as the chart.
When I remove the focus from the chart, by selecting a cell on the
worksheet, the error is no longer produced.
Is this a bug, or designed behavior?
Bookmarks