I've researched this to death and feel like I'm the only person it's ever happened to.
I have some VBA that:
- Creates a copy of 3 sheets to a new wb
- In the new wb converts to values, deletes objects (shapes and controls) and all but 3 ranges
- Opens an existing third file and sets the contents of three ranges in that to match the new wb
- Closes the existing file (saved)
- Closes the new wb (saved)
- Gives a message box saying complete
At the end of all this, something weird happens with the state of the windows. The selected cell does not appear selected. If I try and click a control afterwards, it selects the object (hence users could drag them). It shouldn't and this is the big problem.
I've tried selecting a cell through code, it throws an error. I had limited success by forcing drawing mode off using Call CommandBars("Drawing").Controls("Select Objects").Execute and activating a specific sheet & selecting a cell. However, even then if I even click on a few cells afterwards, the next time I select a control it will select it as an object rather than click the thing.
I have no idea why and can't find anyone who's seen this before.
Any ideas on what I can do?
Thanks,
Basil