I have a database which opens a separate Excel file and modifies the contents such that it can be imported using the
Because that modification requires transposition, I have to use copy & paste, which means data is copied to the clipboard at
Unfortunately, this means when I then close the Excel workbook, I get a prompt asking if I want the contents of the clipboard
to be retained.
Obviously I don't, but I want to skip / bypass the warning altogether.
If I was writing VBA directly in Excel, I would just use :
Application.CutCopyMode = False
but this is not recognised by Access.
I've tried defining Excel as an application object and passing the command through that, but also to no avail :
Dim objExcel As Object
Set objExcel = CreateObject("Excel.Application")
objExcel.CutCopyMode = False
I've even tried turning the warnings off temporarily within Access, no joy :
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, strMyTable, strMyFile, True, strMySheet & "!"
Does anybody know how I can avoid this warning message?