Jul 10 2017
06:36 PM
- last edited on
Jul 25 2018
09:37 AM
by
TechCommunityAP
Jul 10 2017
06:36 PM
- last edited on
Jul 25 2018
09:37 AM
by
TechCommunityAP
Somewhere between V1701 and V1705 a change was made to excel which affects when CutCopyMode is returned back to false. You can see this using Excel normally if you copy something and see those crawling ants but then press the Delete key. Previously this would exit the Copy mode, but now it does not.
I have a VBA macro that updates some ODBC tables. Whenever i make use of the ODBCObjects.Refresh function, it will do the refresh and paste everything from the clipboard at the bottom of the ODBC table. It looks very strange and unexpected.
The work around is simply to set Application.CutCopyMode to false before doing this.
This problem could affect other functions as well, but this one was causing our business massive headaches for the last few weeks.
Aug 02 2017 07:16 PM
Aug 02 2017 08:03 PM
I've already solved it. The work around is to clear out the clipboard prior to doing the ODBC refresh command. Its a single command to a Microsoft Library, thus its impossible to resolve directly. The command is:
odbcCn.Refresh
where odbcCn is the object ODBCConnection
This project is using the Microsoft ActiveX Data Objects 2.8 Library, although i'm fairly certain i've tried a new version without success. This was a little while ago now.