Hi,
I am using VBA to get data from SAP and paste in in to Excel. Recently an issue has occurred which affects VBA recognising the clipboard contents and I get an error 'Cannot paste the data'... the code previously worked fine but now it thinks there is nothing in the clipboard. Now, the strange thing is once the code is interrupted you can press paste manually and the clipboard data is fine, it pastes no problem. I have amended my code as a workaround to end one macro after the data is copied to clipboard, and then created another macro which then will paste the data as long as the first is actually ended and VBA stopped if that makes sense. I cannot use VBA to run one after the other, the paste error occurs... the first has to end, and then I run the 2nd manually which works. The problem is some of my scripts go in and out of SAP 3 or 4 times to get different data sets and I don't really want to split them out in to 4 or 5 macros.
I don't think sharing my code will help as this now happens with numerous macros created, any which copy data from sap and try to paste.
Hope this is clear, any ideas?
I am using VBA to get data from SAP and paste in in to Excel. Recently an issue has occurred which affects VBA recognising the clipboard contents and I get an error 'Cannot paste the data'... the code previously worked fine but now it thinks there is nothing in the clipboard. Now, the strange thing is once the code is interrupted you can press paste manually and the clipboard data is fine, it pastes no problem. I have amended my code as a workaround to end one macro after the data is copied to clipboard, and then created another macro which then will paste the data as long as the first is actually ended and VBA stopped if that makes sense. I cannot use VBA to run one after the other, the paste error occurs... the first has to end, and then I run the 2nd manually which works. The problem is some of my scripts go in and out of SAP 3 or 4 times to get different data sets and I don't really want to split them out in to 4 or 5 macros.
I don't think sharing my code will help as this now happens with numerous macros created, any which copy data from sap and try to paste.
Hope this is clear, any ideas?