Hi everyone,
My problem is the following:
I execute some queries, and at the end, I have to transfer the result in an Excel file that is not yet created. Here is my problem. I don't know how to create a new Excel file in VBA. I know how to open an existing one, but not creating one.
I tried
and that works well in Access 2003, but when I'm testing my program in Access 2002, It gives me the following error:
I'm really confused. Thanks in advance for your help.
My problem is the following:
I execute some queries, and at the end, I have to transfer the result in an Excel file that is not yet created. Here is my problem. I don't know how to create a new Excel file in VBA. I know how to open an existing one, but not creating one.
I tried
Code:
ActiveControl.Hyperlink.CreateNewDocument FilePath, False, False
Error -2147024893 The Method 'CrreateNewDocument' of the Object '_Hyperlink' failed
I'm really confused. Thanks in advance for your help.
